diff --git a/common/content/buffer.js b/common/content/buffer.js index 6ae6b157..74799ba0 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -492,7 +492,7 @@ var Buffer = Module("buffer", { */ followLink: function followLink(elem, where) { let doc = elem.ownerDocument; - let view = doc.defaultView; + let win = doc.defaultView; let { left: offsetX, top: offsetY } = elem.getBoundingClientRect(); if (isinstance(elem, [HTMLFrameElement, HTMLIFrameElement])) @@ -535,6 +535,8 @@ var Buffer = Module("buffer", { ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); + let sel = util.selectionController(win); + sel.getSelection(sel.SELECTION_FOCUS_REGION).collapseToStart(); }); }, diff --git a/common/content/modes.js b/common/content/modes.js index 19f1602d..2840ea6c 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -371,13 +371,13 @@ var Modes = Module("modes", { this.show(); }); - delayed.forEach(function ([fn, self]) dactyl.trapErrors(fn, self)); - if (this.topOfStack.params.enter && prev) dactyl.trapErrors("enter", this.topOfStack.params, push ? { push: push } : stack || {}, prev); + delayed.forEach(function ([fn, self]) dactyl.trapErrors(fn, self)); + dactyl.triggerObserver("modes.change", [oldMain, oldExtended], [this._main, this._extended], stack); this.show(); }, diff --git a/common/content/tabs.js b/common/content/tabs.js index 19ff98f7..c333d636 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -1071,11 +1071,8 @@ var Tabs = Module("tabs", { { values: { "all": "All commands", - "addons": ":addo[ns] command", - "downloads": ":downl[oads] command", "extoptions": ":exto[ptions] command", "help": ":h[elp] command", - "javascript": ":javascript! or :js! command", "prefs": ":pref[erences]! or :prefs! command" }, has: Option.has.toggleAll diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm index cfc6de87..523033de 100644 --- a/common/modules/contexts.jsm +++ b/common/modules/contexts.jsm @@ -124,7 +124,7 @@ var Contexts = Module("contexts", { util.trapErrors("destroy", hive); for (let [name, plugin] in iter(this.modules.plugins.contexts)) - if (plugin && "onUnload" in plugin) + if (plugin && "onUnload" in plugin && callable(plugin.onUnload)) util.trapErrors("onUnload", plugin); }, diff --git a/common/modules/options.jsm b/common/modules/options.jsm index 49243c34..de033724 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -1139,8 +1139,8 @@ var Options = Module("options", { context.pushProcessor(0, function (item, text, next) next(item, text.substr(0, 100))); context.completions = [ - [prefs.get(filter), _("opt.currentValue")], - [prefs.defaults.get(filter), _("opt.defaultValue")] + [prefs.get(filter), _("option.currentValue")], + [prefs.defaults.get(filter), _("option.defaultValue")] ].filter(function (k) k[0] != null); return null; }