Bug 1235154 - Port Bug 869086 to fix right click urlbar error [TypeError this.parentNode.firstChild.focus is not a function] r=Ratty

References:
Bug 869086 - Make textbox.xml resilient against the changes in bug 653881
Bug 653881 - Fix up our XBL1 shadow tree implementation so that we can reuse it for XBL2
This commit is contained in:
Frank-Rainer Grahl 2015-12-29 19:09:34 +08:00
Родитель 19c197bedb
Коммит a9d3452c24
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -661,8 +661,10 @@
<children/>
<xul:menupopup anonid="input-box-contextmenu"
class="textbox-contextmenu"
onpopupshowing="if (document.commandDispatcher.focusedElement != this.parentNode.firstChild)
this.parentNode.firstChild.focus();
onpopupshowing="var input =
this.parentNode.getElementsByAttribute('anonid', 'input')[0];
if (document.commandDispatcher.focusedElement != input)
input.focus();
this.parentNode._doPopupItemEnabling(this);"
oncommand="var cmd = event.originalTarget.getAttribute('cmd'); if(cmd) { this.parentNode.doCommand(cmd); event.stopPropagation(); }">
<xul:menuitem label="&undoCmd.label;" accesskey="&undoCmd.accesskey;" cmd="cmd_undo"/>