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

Import the bulk of a focus management patch near the top of my queue.

This commit is contained in:
Kris Maglione
2010-12-18 15:27:45 -05:00
parent 0af241568b
commit 4ff7172c77
8 changed files with 81 additions and 48 deletions

View File

@@ -296,7 +296,7 @@ const Buffer = Module("buffer", {
// Workaround for bugs 591425 and 606877, dactyl bug #81
let collapse = uri && uri.scheme === "dactyl" && webProgress.isLoadingDocument;
if (collapse)
config.focus.setFocus(window.documentElement);
dactyl.focus(document.documentElement);
config.browser.mCurrentBrowser.collapsed = collapse;
uri && uri.scheme === "dactyl" && webProgress.isLoadingDocument;
@@ -543,7 +543,7 @@ const Buffer = Module("buffer", {
buffer.lastInputField = elem;
}
else {
elem.focus();
dactyl.focus(elem);
if (elem instanceof Window) {
let sel = elem.getSelection();
if (sel && !sel.rangeCount)
@@ -873,7 +873,7 @@ const Buffer = Module("buffer", {
next = Math.constrain(next, 0, frames.length - 1);
// focus next frame and scroll into view
frames[next].focus();
dactyl.focus(frames[next]);
if (frames[next] != content)
frames[next].frameElement.scrollIntoView(false);