diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/modules/dom.jsm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index 72bd775d..cc7384cb 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -819,8 +819,11 @@ var DOM = Class("DOM", { elem = elem.defaultView; if (elem instanceof Ci.nsIDOMElement) services.focus.setFocus(elem, flags); - else if (elem instanceof Ci.nsIDOMWindow) + else if (elem instanceof Ci.nsIDOMWindow) { services.focus.focusedWindow = elem; + if (services.focus.focusedWindow != elem) + services.focus.clearFocus(elem); + } } catch (e) { util.dump(elem); |