mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 00:37:58 +01:00
Collapse bloody focus region selection after following a hint.
This commit is contained in:
@@ -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();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user