Skip to content
This repository was archived by the owner on Jul 5, 2019. It is now read-only.

Commit 0a46c4b

Browse files
zbinlinmadand
authored andcommitted
Cherry pick 5digits#178
Fix `TypeError: options is undefined` When open a new window and close it, then press `gg` in the original window will throw `TypeError: options is undefined`.
1 parent 1910720 commit 0a46c4b

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

common/content/dactyl.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,13 +2069,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
20692069
statusline.update();
20702070
dactyl.log(_("dactyl.initialized", config.appName), 0);
20712071
dactyl.initialized = true;
2072-
2073-
util.delay(() => {
2074-
if (services.focus.activeWindow === window)
2075-
overlay.activeWindow = window;
2076-
2077-
util.flushLateMethods(dactyl);
2078-
});
20792072
}
20802073
});
20812074

common/content/events.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,6 @@ var Events = Module("events", {
618618
util.trapErrors("addEditActionListener",
619619
DOM(elem).editor, editor);
620620

621-
if (elem == window)
622-
overlay.activeWindow = window;
623-
624621
overlay.setData(elem, "had-focus", true);
625622
if (event.target instanceof Ci.nsIDOMXULTextBoxElement)
626623
if (Events.isHidden(elem, true))
@@ -873,6 +870,12 @@ var Events = Module("events", {
873870
autocommands.trigger("Fullscreen", { url: this._fullscreen ? "on" : "off", state: this._fullscreen });
874871
}
875872
statusline.updateZoomLevel();
873+
},
874+
875+
activate: function onActivate(event) {
876+
if (event.target === window) {
877+
overlay.activeWindow = window;
878+
}
876879
}
877880
},
878881

0 commit comments

Comments
 (0)