1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 16:52:25 +01:00
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`.
This commit is contained in:
Zheng Chaoping
2016-09-05 23:55:43 +08:00
committed by MadAnd
parent 1910720de8
commit 0a46c4be52
2 changed files with 6 additions and 10 deletions

View File

@@ -2069,13 +2069,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
statusline.update(); statusline.update();
dactyl.log(_("dactyl.initialized", config.appName), 0); dactyl.log(_("dactyl.initialized", config.appName), 0);
dactyl.initialized = true; dactyl.initialized = true;
util.delay(() => {
if (services.focus.activeWindow === window)
overlay.activeWindow = window;
util.flushLateMethods(dactyl);
});
} }
}); });

View File

@@ -618,9 +618,6 @@ var Events = Module("events", {
util.trapErrors("addEditActionListener", util.trapErrors("addEditActionListener",
DOM(elem).editor, editor); DOM(elem).editor, editor);
if (elem == window)
overlay.activeWindow = window;
overlay.setData(elem, "had-focus", true); overlay.setData(elem, "had-focus", true);
if (event.target instanceof Ci.nsIDOMXULTextBoxElement) if (event.target instanceof Ci.nsIDOMXULTextBoxElement)
if (Events.isHidden(elem, true)) if (Events.isHidden(elem, true))
@@ -873,6 +870,12 @@ var Events = Module("events", {
autocommands.trigger("Fullscreen", { url: this._fullscreen ? "on" : "off", state: this._fullscreen }); autocommands.trigger("Fullscreen", { url: this._fullscreen ? "on" : "off", state: this._fullscreen });
} }
statusline.updateZoomLevel(); statusline.updateZoomLevel();
},
activate: function onActivate(event) {
if (event.target === window) {
overlay.activeWindow = window;
}
} }
}, },