1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 22:07:58 +01:00

Collapse bloody focus region selection after following a hint.

This commit is contained in:
Kris Maglione
2011-03-23 14:16:18 -04:00
parent 5f4bf0537a
commit 46e8d43429
5 changed files with 8 additions and 9 deletions

View File

@@ -492,7 +492,7 @@ var Buffer = Module("buffer", {
*/ */
followLink: function followLink(elem, where) { followLink: function followLink(elem, where) {
let doc = elem.ownerDocument; let doc = elem.ownerDocument;
let view = doc.defaultView; let win = doc.defaultView;
let { left: offsetX, top: offsetY } = elem.getBoundingClientRect(); let { left: offsetX, top: offsetY } = elem.getBoundingClientRect();
if (isinstance(elem, [HTMLFrameElement, HTMLIFrameElement])) if (isinstance(elem, [HTMLFrameElement, HTMLIFrameElement]))
@@ -535,6 +535,8 @@ var Buffer = Module("buffer", {
ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey
})); }));
}); });
let sel = util.selectionController(win);
sel.getSelection(sel.SELECTION_FOCUS_REGION).collapseToStart();
}); });
}, },

View File

@@ -371,13 +371,13 @@ var Modes = Module("modes", {
this.show(); this.show();
}); });
delayed.forEach(function ([fn, self]) dactyl.trapErrors(fn, self));
if (this.topOfStack.params.enter && prev) if (this.topOfStack.params.enter && prev)
dactyl.trapErrors("enter", this.topOfStack.params, dactyl.trapErrors("enter", this.topOfStack.params,
push ? { push: push } : stack || {}, push ? { push: push } : stack || {},
prev); prev);
delayed.forEach(function ([fn, self]) dactyl.trapErrors(fn, self));
dactyl.triggerObserver("modes.change", [oldMain, oldExtended], [this._main, this._extended], stack); dactyl.triggerObserver("modes.change", [oldMain, oldExtended], [this._main, this._extended], stack);
this.show(); this.show();
}, },

View File

@@ -1071,11 +1071,8 @@ var Tabs = Module("tabs", {
{ {
values: { values: {
"all": "All commands", "all": "All commands",
"addons": ":addo[ns] command",
"downloads": ":downl[oads] command",
"extoptions": ":exto[ptions] command", "extoptions": ":exto[ptions] command",
"help": ":h[elp] command", "help": ":h[elp] command",
"javascript": ":javascript! or :js! command",
"prefs": ":pref[erences]! or :prefs! command" "prefs": ":pref[erences]! or :prefs! command"
}, },
has: Option.has.toggleAll has: Option.has.toggleAll

View File

@@ -124,7 +124,7 @@ var Contexts = Module("contexts", {
util.trapErrors("destroy", hive); util.trapErrors("destroy", hive);
for (let [name, plugin] in iter(this.modules.plugins.contexts)) 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); util.trapErrors("onUnload", plugin);
}, },

View File

@@ -1139,8 +1139,8 @@ var Options = Module("options", {
context.pushProcessor(0, function (item, text, next) next(item, text.substr(0, 100))); context.pushProcessor(0, function (item, text, next) next(item, text.substr(0, 100)));
context.completions = [ context.completions = [
[prefs.get(filter), _("opt.currentValue")], [prefs.get(filter), _("option.currentValue")],
[prefs.defaults.get(filter), _("opt.defaultValue")] [prefs.defaults.get(filter), _("option.defaultValue")]
].filter(function (k) k[0] != null); ].filter(function (k) k[0] != null);
return null; return null;
} }