From b0bca11890557b2fdfff15a91741238f47f7f661 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 22 Dec 2010 05:23:35 -0500 Subject: [PATCH] Deal with native keyboard scrolling issues after focusContent, with the side-effect of again focusing the top-level window when the content window is focused. --- common/content/bindings.xml | 4 +-- common/content/configbase.js | 48 +++++++++++++++++++------------ common/content/dactyl.js | 2 +- common/locale/en-US/developer.xml | 2 +- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/common/content/bindings.xml b/common/content/bindings.xml index 8b95165b..746ca242 100644 --- a/common/content/bindings.xml +++ b/common/content/bindings.xml @@ -6,10 +6,10 @@ xmlns:xbl="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml"> - + - + diff --git a/common/content/configbase.js b/common/content/configbase.js index e0af604e..d8905393 100644 --- a/common/content/configbase.js +++ b/common/content/configbase.js @@ -198,25 +198,34 @@ const ConfigBase = Class(ModuleBase, { CmdInput;.dactyl-commandline-command CmdOutput white-space: pre; + CompGroup CompGroup:not(:first-of-type) margin-top: .5em; + CompGroup:last-of-type padding-bottom: 1.5ex; + CompTitle color: magenta; background: white; font-weight: bold; CompTitle>* padding: 0 .5ex; CompTitleSep height: 1px; background: magenta; background: -moz-linear-gradient(60deg, magenta, white); + CompMsg font-style: italic; margin-left: 16px; + CompItem CompItem:nth-child(2n+1) background: rgba(0, 0, 0, .04); CompItem[selected] background: yellow; CompItem>* padding: 0 .5ex; + CompIcon width: 16px; min-width: 16px; display: inline-block; margin-right: .5ex; CompIcon>img max-width: 16px; max-height: 16px; vertical-align: middle; + CompResult width: 36%; padding-right: 1%; overflow: hidden; CompDesc color: gray; width: 62%; padding-left: 1em; + CompLess text-align: center; height: 0; line-height: .5ex; padding-top: 1ex; CompLess::after content: "⌃"; + CompMore text-align: center; height: .5ex; line-height: .5ex; margin-bottom: -.5ex; CompMore::after content: "⌄"; - CompGroup:last-of-type padding-bottom: 1.5ex; + EditorEditing;;* background: #bbb !important; -moz-user-input: none; -moz-user-modify: read-only; EditorError;;* background: red !important; @@ -258,27 +267,25 @@ const ConfigBase = Class(ModuleBase, { URLExtra color: gray; FrameIndicator;;* { - /* This gets released into the wild, so everything is important */ - background-color: red !important; - opacity: 0.5 !important; - z-index: 999999 !important; - position: fixed !important; - top: 0 !important; - bottom: 0 !important; - left: 0 !important; - right: 0 !important; + background-color: red; + opacity: 0.5; + z-index: 999999; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; } - !Bell background-color: black !important; + Bell background-color: black !important; + Hint;;* { - /* This gets released into the wild, so everything is important */ font-size: 10px !important; font-family: monospace !important; font-weight: bold !important; - background-color: red !important; - color: white !important; - border: 0px solid ButtonShadow !important; - padding: 0px 1px !important; + background-color: red; + color: white; + padding: 0px 1px; } Hint::after;;* content: attr(text) !important; HintElem;;* background-color: yellow !important; color: black !important; @@ -328,14 +335,20 @@ const ConfigBase = Class(ModuleBase, { padding-right: 13px; } + + HelpTOC + HelpTOC>ol ol margin-left: -1em; + HelpOrderedList;ol;dactyl://help/* HelpOrderedList1;ol[level="1"],ol;dactyl://help/* list-style: outside decimal; display: block; HelpOrderedList2;ol[level="2"],ol ol;dactyl://help/* list-style: outside upper-alpha; HelpOrderedList3;ol[level="3"],ol ol ol;dactyl://help/* list-style: outside lower-roman; HelpOrderedList4;ol[level="4"],ol ol ol ol;dactyl://help/* list-style: outside decimal; + HelpList;html|ul;dactyl://help/* display: block; list-style: outside disc; HelpListItem;html|li;dactyl://help/* display: list-item; + HelpNote color: red; font-weight: bold; HelpOpt color: #106326; @@ -352,6 +365,7 @@ const ConfigBase = Class(ModuleBase, { HelpString[delim]::before content: attr(delim); HelpString[delim]::after content: attr(delim); + HelpHead;html|h1,html|h2,html|h3,html|h4;dactyl://help/* { font-weight: bold; color: #527BBD; @@ -377,8 +391,6 @@ const ConfigBase = Class(ModuleBase, { HelpHead4;html|h4;dactyl://help/* { } - HelpTOC - HelpTOC>ol ol margin-left: -1em; HelpTab;html|dl;dactyl://help/* { display: table; diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 1bd1d1fc..16250185 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -369,7 +369,7 @@ const Dactyl = Module("dactyl", { if (elem instanceof Document) elem = elem.defaultView; if (elem instanceof Window) - services.focus.clearFocus(elem); + services.focus.focusedWindow = elem; else services.focus.setFocus(elem, flags); } catch (e) { diff --git a/common/locale/en-US/developer.xml b/common/locale/en-US/developer.xml index 18d922b9..65c44d2b 100644 --- a/common/locale/en-US/developer.xml +++ b/common/locale/en-US/developer.xml @@ -178,7 +178,7 @@

Plugins should provide inline documentation, which will appear on the - :help plugins page. The markup for help entries is the same + :help plugins page. The markup for help entries is the same as the above, along with a few extra plugin-specific entries. Here is an example from the popular flashblock extension: