From 560e25a6a0bca0ede2aed93c9433f0cebe89e065 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 17 Nov 2010 08:50:20 -0500 Subject: [PATCH] Flip some state flags in an attempt to get mouse events working. --- web_frontend/actor.js | 4 ++++ web_frontend/path_control.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web_frontend/actor.js b/web_frontend/actor.js index 697a23d..b077f93 100644 --- a/web_frontend/actor.js +++ b/web_frontend/actor.js @@ -31,6 +31,9 @@ goog.require('goog.ui.Dialog'); armadillo.Actor = function(file, opt_domHelper) { goog.ui.Container.call(this, null, null, opt_domHelper); + this.setFocusable(false); + this.setFocusableChildrenAllowed(true); + /** * The file object on which this acts. * @type {armadillo.File} @@ -124,6 +127,7 @@ armadillo.Actor.prototype.decorateInternal = function(element) { } } this.controlContainer_ = new goog.ui.Control(); + this.controlContainer_.setSupportedState(goog.ui.Component.State.FOCUSED, false); this.addChild(this.controlContainer_, true); }; diff --git a/web_frontend/path_control.js b/web_frontend/path_control.js index 525aa1c..45cbbb8 100644 --- a/web_frontend/path_control.js +++ b/web_frontend/path_control.js @@ -27,6 +27,8 @@ goog.require('goog.ui.MenuItem'); armadillo.PathControl = function(path, editLastComponent, opt_domHelper) { goog.ui.Control.call(this, opt_domHelper); + this.setSupportedState(goog.ui.Component.State.FOCUSED, false); + /** * Full path of the control. * @type {string} @@ -144,7 +146,7 @@ armadillo.PathControl.prototype.decorateInternal = function(element) { this.nameControl_ = new goog.ui.Control(this.dom_.createDom('input', attrs), new armadillo.PathControl.NameControlRenderer_()); this.nameControl_.setAllowTextSelection(true); - this.nameControl_.setHandleMouseEvents(true); + this.nameControl_.setHandleMouseEvents(false); this.addChild(this.nameControl_, true); this.eh_.listen(this.nameControl_.getElement(), goog.events.EventType.CHANGE, -- 2.22.5