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

Fix some smallish focus issued.

This commit is contained in:
Kris Maglione
2010-12-30 00:17:01 -05:00
parent 6b41435f30
commit 5f1c47ee20
4 changed files with 20 additions and 20 deletions

View File

@@ -258,7 +258,7 @@ var Buffer = Module("buffer", {
else if (flags & Ci.nsIWebProgressListener.STATE_STOP) { else if (flags & Ci.nsIWebProgressListener.STATE_STOP) {
// Workaround for bugs 591425 and 606877, dactyl bug #81 // Workaround for bugs 591425 and 606877, dactyl bug #81
config.browser.mCurrentBrowser.collapsed = false; config.browser.mCurrentBrowser.collapsed = false;
if (!dactyl.focusedElement) if (!dactyl.focusedElement || dactyl.focusedElement === document.documentElement)
dactyl.focusContent(); dactyl.focusContent();
statusline.updateUrl(); statusline.updateUrl();
} }

View File

@@ -719,6 +719,7 @@ var Events = Module("events", {
let rect = dactyl.focusedElement.getBoundingClientRect(); let rect = dactyl.focusedElement.getBoundingClientRect();
if (!rect.width || !rect.height) { if (!rect.width || !rect.height) {
services.focus.clearFocus(window); services.focus.clearFocus(window);
document.commandDispatcher.focusedWindow = content;
// onFocusChange needs to die. // onFocusChange needs to die.
this.onFocusChange(); this.onFocusChange();
} }
@@ -726,12 +727,14 @@ var Events = Module("events", {
}, },
onBlur: function onFocus(event) { onBlur: function onFocus(event) {
if (event.originalTarget instanceof Window && services.focus.activeWindow == null) if (event.originalTarget instanceof Window && services.focus.activeWindow == null) {
// Deals with circumstances where, after the main window // Deals with circumstances where, after the main window
// blurs while a collapsed frame has focus, re-activating // blurs while a collapsed frame has focus, re-activating
// the main window does not restore focus and we lose key // the main window does not restore focus and we lose key
// input. // input.
services.focus.clearFocus(window); services.focus.clearFocus(window);
document.commandDispatcher.focusedWindow = content;
}
}, },
// TODO: Merge with onFocusChange // TODO: Merge with onFocusChange

View File

@@ -976,9 +976,9 @@ var Tabs = Module("tabs", {
return value; return value;
}, },
completer: function (context) [ completer: function (context) [
["never", "Never show tab bar"], ["never", "Never show the tab bar"],
["multitab", "Show tab bar when there are multiple tabs"], ["multitab", "Show the tab bar when there are multiple tabs"],
["always", "Always show tab bar"] ["always", "Always show the tab bar"]
] ]
}); });

View File

@@ -4,11 +4,10 @@
<!DOCTYPE document SYSTEM "chrome://dactyl/content/help.dtd" [ <!DOCTYPE document SYSTEM "chrome://dactyl/content/help.dtd" [
<!ENTITY hinttags "//*[@onclick or @onmouseover or @onmousedown or <!ENTITY hinttags "//*[@onclick or @onmouseover or @onmousedown or
@onmouseup or @oncommand or @role='link'] | @onmouseup or @oncommand or @role='link'] |
//input[not(@type='hidden')] | //a | //area | //input[not(@type='hidden')] | //xhtml:input[not(@type='hidden')] |
//iframe | //textarea | //button | //select | //a | //xhtml:a | //area | //xhtml:area |
//xhtml:input[not(@type='hidden')] | //xhtml:a | //button | //xhtml:button | //iframe | //xhtml:iframe |
//xhtml:area | //xhtml:iframe | //xhtml:textarea | //select | //xhtml:select | //textarea | //xhtml:textarea">
//xhtml:button | //xhtml:select">
]> ]>
<document <document
@@ -640,10 +639,8 @@
//area[@href] | //xhtml:area[@href] | //area[@href] | //xhtml:area[@href] |
//img[@src] | //xhtml:img[@src] | //img[@src] | //xhtml:img[@src] |
//iframe[@src] | //xhtml:iframe[@src]', //iframe[@src] | //xhtml:iframe[@src]',
[F]:'//div | //xhtml:div | [F]:'//div | //xhtml:div | //span | //xhtml:span |
//span | //xhtml:span | //p | //xhtml:p | //body | //xhtml:body |
//p | //xhtml:p |
//body | //xhtml:body |
//html | //xhtml:html' //html | //xhtml:html'
[S]:'//input[not(@type=''hidden'')] | [S]:'//input[not(@type=''hidden'')] |
//xhtml:input[not(@type=''hidden'')] | //xhtml:input[not(@type=''hidden'')] |
@@ -1356,9 +1353,9 @@
<p>Define when the tab bar is visible.</p> <p>Define when the tab bar is visible.</p>
<dl> <dl>
<dt>always</dt> <dd>Always show tab bar</dd> <dt>always</dt> <dd>Always show the tab bar</dd>
<dt>multitab</dt> <dd>Show tab bar when there are multiple tabs</dd> <dt>multitab</dt> <dd>Show the tab bar when there are multiple tabs</dd>
<dt>never</dt> <dd>Never show tab bar</dd> <dt>never</dt> <dd>Never show the tab bar</dd>
</dl> </dl>
</description> </description>
</item> </item>