mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 559458 - document.getElementById(prompt-confirm-dialog) can be null in confirm.xul [r=mfinkle]
This commit is contained in:
parent
5e1a31e5a8
commit
7b96f05622
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE vbox SYSTEM "chrome://browser/locale/prompt.dtd">
|
||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="prompt-confirm-dialog"
|
||||
onload="document.getElementById('prompt-confirm-button-ok').focus()"
|
||||
onload="document.getElementsByAttribute('command', 'cmd_ok')[0].focus()"
|
||||
onclose="this.PromptHelper.onCloseConfirm(this)"
|
||||
script="chrome://browser/content/prompt/prompt.js">
|
||||
<keyset>
|
||||
|
@ -295,8 +295,13 @@ promptService.prototype = {
|
||||
let button = doc.createElement("button");
|
||||
this.setLabelForNode(button, bTitle);
|
||||
button.setAttribute("class", "button-dark");
|
||||
button.setAttribute("oncommand",
|
||||
"document.getElementById('prompt-confirm-dialog').PromptHelper.closeConfirm(" + i + ")");
|
||||
if (i == defaultButton) {
|
||||
button.setAttribute("command", "cmd_ok");
|
||||
}
|
||||
else {
|
||||
button.setAttribute("oncommand",
|
||||
"document.getElementById('prompt-confirm-dialog').PromptHelper.closeConfirm(" + i + ")");
|
||||
}
|
||||
bbox.appendChild(button);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user