summaryrefslogtreecommitdiff
path: root/common/modules
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-10-23 23:41:40 -0400
committerKris Maglione <maglione.k@gmail.com>2011-10-23 23:41:40 -0400
commit6ef8867d1653a7d035ea23e141631aee9488e9ff (patch)
treec4ce488f39b951c924695ab2adfcec4c33afee4f /common/modules
parent854eda46907432e4a758b30eee1a9f81ab1c50b7 (diff)
downloadpentadactyl-6ef8867d1653a7d035ea23e141631aee9488e9ff.tar.gz
Closes issue #699.
Diffstat (limited to 'common/modules')
-rw-r--r--common/modules/dom.jsm5
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);