mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
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:
parent
afd2789dc8
commit
fcf9864051
@ -376,6 +376,12 @@
|
|||||||
document.getAnonymousElementByAttribute(this, "anonid", "input");
|
document.getAnonymousElementByAttribute(this, "anonid", "input");
|
||||||
]]></field>
|
]]></field>
|
||||||
|
|
||||||
|
<field name="mMenuAccessKey"><![CDATA[
|
||||||
|
Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
|
.getService(Components.interfaces.nsIPrefBranch)
|
||||||
|
.getIntPref("ui.key.menuAccessKey");
|
||||||
|
]]></field>
|
||||||
|
|
||||||
<!-- =================== PUBLIC METHODS =================== -->
|
<!-- =================== PUBLIC METHODS =================== -->
|
||||||
|
|
||||||
<!-- get the result object from the autocomplete results from a specific session -->
|
<!-- get the result object from the autocomplete results from a specific session -->
|
||||||
@ -915,6 +921,18 @@
|
|||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</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">
|
<method name="processKeyPress">
|
||||||
<parameter name="aEvent"/>
|
<parameter name="aEvent"/>
|
||||||
@ -1387,6 +1405,9 @@
|
|||||||
<handler event="input"
|
<handler event="input"
|
||||||
action="this.processInput();"/>
|
action="this.processInput();"/>
|
||||||
|
|
||||||
|
<handler event="keydown" phase="capturing"
|
||||||
|
action="return this.processKeyDown(event);"/>
|
||||||
|
|
||||||
<handler event="keypress" phase="capturing"
|
<handler event="keypress" phase="capturing"
|
||||||
action="return this.processKeyPress(event);"/>
|
action="return this.processKeyPress(event);"/>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user