mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:07:59 +01:00
Fix activating scrollable elements via ;F.
--HG-- branch : bootstrapped
This commit is contained in:
@@ -539,7 +539,12 @@ var Buffer = Module("buffer", {
|
||||
buffer.lastInputField = elem;
|
||||
}
|
||||
else {
|
||||
dactyl.focus(elem);
|
||||
if (isinstance(elem, [HTMLInputElement, XULTextBoxElement]))
|
||||
var flags = services.focus.FLAG_BYMOUSE;
|
||||
else
|
||||
flags = services.focus.FLAG_SHOWRING;
|
||||
dactyl.focus(elem, flags);
|
||||
|
||||
if (elem instanceof Window) {
|
||||
let sel = elem.getSelection();
|
||||
if (sel && !sel.rangeCount)
|
||||
|
||||
@@ -363,31 +363,21 @@ var Styles = Module("Styles", {
|
||||
commands: function (dactyl, modules, window) {
|
||||
const commands = modules.commands;
|
||||
|
||||
const queue = [];
|
||||
const timer = Timer(10, 10, function () {
|
||||
let args = queue.shift()
|
||||
let [filter, css] = args;
|
||||
if ("-append" in args) {
|
||||
let sheet = styles.user.get(args["-name"]);
|
||||
if (sheet) {
|
||||
filter = sheet.sites.concat(filter).join(",");
|
||||
css = sheet.css + " " + css;
|
||||
|
||||
}
|
||||
}
|
||||
styles.user.add(args["-name"], filter, css, args["-agent"]);
|
||||
|
||||
if (queue.length)
|
||||
timer.tell();
|
||||
});
|
||||
commands.add(["sty[le]"],
|
||||
"Add or list user styles",
|
||||
function (args) {
|
||||
let [filter, css] = args;
|
||||
|
||||
if (css) {
|
||||
queue.push(args);
|
||||
timer.tell(args);
|
||||
if ("-append" in args) {
|
||||
let sheet = styles.user.get(args["-name"]);
|
||||
if (sheet) {
|
||||
filter = sheet.sites.concat(filter).join(",");
|
||||
css = sheet.css + " " + css;
|
||||
|
||||
}
|
||||
}
|
||||
styles.user.add(args["-name"], filter, css, args["-agent"]);
|
||||
}
|
||||
else {
|
||||
let list = styles.user.sheets.slice()
|
||||
|
||||
Reference in New Issue
Block a user