diff options
Diffstat (limited to 'toolkit/content/widgets')
-rw-r--r-- | toolkit/content/widgets/findbar.xml | 58 | ||||
-rw-r--r-- | toolkit/content/widgets/menulist.xml | 18 |
2 files changed, 47 insertions, 29 deletions
diff --git a/toolkit/content/widgets/findbar.xml b/toolkit/content/widgets/findbar.xml index f90d41227..b92fb1d05 100644 --- a/toolkit/content/widgets/findbar.xml +++ b/toolkit/content/widgets/findbar.xml @@ -162,21 +162,29 @@ <content hidden="true"> <xul:hbox anonid="findbar-container" class="findbar-container" flex="1" align="center"> <xul:hbox anonid="findbar-textbox-wrapper" align="stretch"> + <xul:toolbarbutton anonid="find-closebutton" + class="findbar-closebutton close-icon" + tooltiptext="&findCloseButton.tooltip;" + oncommand="close();"/> <xul:textbox anonid="findbar-textbox" class="findbar-textbox findbar-find-fast" xbl:inherits="flash"/> - <xul:toolbarbutton anonid="find-previous" - class="findbar-find-previous tabbable" - tooltiptext="&previous.tooltip;" - oncommand="onFindAgainCommand(true);" - disabled="true" - xbl:inherits="accesskey=findpreviousaccesskey"/> - <xul:toolbarbutton anonid="find-next" + <xul:toolbarbutton anonid="find-next" class="findbar-find-next tabbable" + label="&next.label;" + accesskey="&next.accesskey;" tooltiptext="&next.tooltip;" oncommand="onFindAgainCommand(false);" disabled="true" xbl:inherits="accesskey=findnextaccesskey"/> + <xul:toolbarbutton anonid="find-previous" + class="findbar-find-previous tabbable" + label="&previous.label;" + accesskey="&previous.accesskey;" + tooltiptext="&previous.tooltip;" + oncommand="onFindAgainCommand(true);" + disabled="true" + xbl:inherits="accesskey=findpreviousaccesskey"/> </xul:hbox> <xul:toolbarbutton anonid="highlight" class="findbar-highlight findbar-button tabbable" @@ -186,22 +194,22 @@ oncommand="toggleHighlight(this.checked);" type="checkbox" xbl:inherits="accesskey=highlightaccesskey"/> - <xul:toolbarbutton anonid="find-case-sensitive" - class="findbar-case-sensitive findbar-button tabbable" - label="&caseSensitive.label;" - accesskey="&caseSensitive.accesskey;" - tooltiptext="&caseSensitive.tooltiptext;" - oncommand="_setCaseSensitivity(this.checked ? 1 : 0);" - type="checkbox" - xbl:inherits="accesskey=matchcaseaccesskey"/> - <xul:toolbarbutton anonid="find-entire-word" - class="findbar-entire-word findbar-button tabbable" - label="&entireWord.label;" - accesskey="&entireWord.accesskey;" - tooltiptext="&entireWord.tooltiptext;" - oncommand="toggleEntireWord(this.checked);" - type="checkbox" - xbl:inherits="accesskey=entirewordaccesskey"/> + <xul:checkbox anonid="find-case-sensitive" + class="findbar-case-sensitive findbar-button tabbable" + label="&caseSensitive.label;" + accesskey="&caseSensitive.accesskey;" + tooltiptext="&caseSensitive.tooltiptext;" + oncommand="_setCaseSensitivity(this.checked ? 1 : 0);" + type="checkbox" + xbl:inherits="accesskey=matchcaseaccesskey"/> + <xul:checkbox anonid="find-entire-word" + class="findbar-entire-word findbar-button tabbable" + label="&entireWord.label;" + accesskey="&entireWord.accesskey;" + tooltiptext="&entireWord.tooltiptext;" + oncommand="toggleEntireWord(this.checked);" + type="checkbox" + xbl:inherits="accesskey=entirewordaccesskey"/> <xul:label anonid="match-case-status" class="findbar-find-fast"/> <xul:label anonid="entire-word-status" class="findbar-find-fast"/> <xul:label anonid="found-matches" class="findbar-find-fast found-matches" hidden="true"/> @@ -212,10 +220,6 @@ <!-- Do not use value, first child is used because it provides a11y with text change events --> </xul:description> </xul:hbox> - <xul:toolbarbutton anonid="find-closebutton" - class="findbar-closebutton close-icon" - tooltiptext="&findCloseButton.tooltip;" - oncommand="close();"/> </content> <implementation implements="nsIMessageListener, nsIEditActionListener"> diff --git a/toolkit/content/widgets/menulist.xml b/toolkit/content/widgets/menulist.xml index ccdf3bd26..96c011809 100644 --- a/toolkit/content/widgets/menulist.xml +++ b/toolkit/content/widgets/menulist.xml @@ -129,8 +129,22 @@ <property name="label" readonly="true" onget="return this.getAttribute('label');"/> <property name="description" onset="this.setAttribute('description',val); return val;" onget="return this.getAttribute('description');"/> - <property name="editable" onset="this.setAttribute('editable',val); return val;" - onget="return this.getAttribute('editable') == 'true';"/> + + <property name="editable" onget="return this.getAttribute('editable') == 'true';"> + <setter> + <![CDATA[ + if (!val && this.editable) { + // If we were focused and transition from editable to not editable, + // focus the parent menulist so that the focus does not get stuck. + if (this.inputField == document.activeElement) + window.setTimeout(() => this.focus(), 0); + } + + this.setAttribute("editable", val); + return val; + ]]> + </setter> + </property> <property name="open" onset="this.menuBoxObject.openMenu(val); return val;" |