зеркало из https://github.com/mozilla/gecko-dev.git
Bug 223277: real fix concerning the event chain + Band aid patch for an XBL bug.
This commit is contained in:
Родитель
759d5381ff
Коммит
98ff022f8a
|
@ -146,20 +146,22 @@
|
|||
|
||||
<handlers>
|
||||
|
||||
<handler event="keypress" keycode="vk_up" modifiers="control">
|
||||
<handler event="keypress" keycode="vk_up" modifiers="control" phase="capturing">
|
||||
<![CDATA[
|
||||
var currentEngine = this.currentEngine;
|
||||
if (!currentEngine || currentEngine == "__PhoenixFindInPage")
|
||||
return;
|
||||
if (currentEngine && currentEngine != "__PhoenixFindInPage") {
|
||||
var searchEngineMenuitem = document.getElementById(currentEngine);
|
||||
var newEngine = searchEngineMenuitem.previousSibling;
|
||||
if (!newEngine.id)
|
||||
newEngine = {id: "__PhoenixFindInPage"}
|
||||
this.currentEngine = newEngine.id;
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
<handler event="keypress" keycode="vk_down" modifiers="control">
|
||||
<handler event="keypress" keycode="vk_down" modifiers="control" phase="capturing">
|
||||
<![CDATA[
|
||||
var currentEngine = this.currentEngine;
|
||||
if (!currentEngine)
|
||||
|
@ -173,6 +175,8 @@
|
|||
}
|
||||
if (newEngine)
|
||||
this.currentEngine = newEngine.id;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче