Bug 223277: real fix concerning the event chain + Band aid patch for an XBL bug.

This commit is contained in:
chanial%noos.fr 2006-02-18 00:13:13 +00:00
Родитель 759d5381ff
Коммит 98ff022f8a
1 изменённых файлов: 13 добавлений и 9 удалений

Просмотреть файл

@ -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>