mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-20 16:35:46 +01:00
Fix 'focuscontent' error.
This commit is contained in:
@@ -551,14 +551,14 @@ function Events() //{{{
|
|||||||
if (doc == getBrowser().contentDocument)
|
if (doc == getBrowser().contentDocument)
|
||||||
{
|
{
|
||||||
// we want to stay in command mode after a page has loaded
|
// we want to stay in command mode after a page has loaded
|
||||||
// TODO: move somehwere else, as focusing can already happen earlier than on "load"
|
// TODO: move somewhere else, as focusing can already happen earlier than on "load"
|
||||||
if (options["focuscontent"])
|
if (options["focuscontent"])
|
||||||
{
|
{
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
let focused = liberator.focus;
|
let focused = liberator.focus;
|
||||||
if (focused && (focused.value !== undefined) && focused.value.length == 0)
|
if (focused && (focused.value != null) && focused.value.length == 0)
|
||||||
focused.blur();
|
focused.blur();
|
||||||
}, 100);
|
}, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // background tab
|
else // background tab
|
||||||
|
|||||||
Reference in New Issue
Block a user