зеркало из https://github.com/mozilla/gecko-dev.git
Bug 270128 Menu access key should close autocomplete r=aaronlev,ajschult [p=Neil]
(from) Bug 443837 - Get SeaMonkey/Thunderbird patches from cvs trunk into mozilla-central
This commit is contained in:
Родитель
afd2789dc8
Коммит
fcf9864051
|
@ -376,6 +376,12 @@
|
|||
document.getAnonymousElementByAttribute(this, "anonid", "input");
|
||||
]]></field>
|
||||
|
||||
<field name="mMenuAccessKey"><![CDATA[
|
||||
Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch)
|
||||
.getIntPref("ui.key.menuAccessKey");
|
||||
]]></field>
|
||||
|
||||
<!-- =================== PUBLIC METHODS =================== -->
|
||||
|
||||
<!-- get the result object from the autocomplete results from a specific session -->
|
||||
|
@ -915,6 +921,18 @@
|
|||
]]></body>
|
||||
</method>
|
||||
|
||||
<!-- -->
|
||||
<method name="processKeyDown">
|
||||
<parameter name="aEvent"/>
|
||||
<body><![CDATA[
|
||||
if (aEvent.keyCode && aEvent.keyCode == this.mMenuAccessKey) {
|
||||
this.finishAutoComplete(false, false, aEvent);
|
||||
this.clearTimer();
|
||||
this.closeResultPopup();
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<!-- -->
|
||||
<method name="processKeyPress">
|
||||
<parameter name="aEvent"/>
|
||||
|
@ -1387,6 +1405,9 @@
|
|||
<handler event="input"
|
||||
action="this.processInput();"/>
|
||||
|
||||
<handler event="keydown" phase="capturing"
|
||||
action="return this.processKeyDown(event);"/>
|
||||
|
||||
<handler event="keypress" phase="capturing"
|
||||
action="return this.processKeyPress(event);"/>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче