mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1233747 and bug 1235709 - deal better with host-less URIs in the checkbox handling for dialogs in non-selected tabs, r=Aryx
This commit is contained in:
parent
445c4a4615
commit
0e3592326f
@ -7923,13 +7923,17 @@ TabModalPromptBox.prototype = {
|
||||
delete this._allowTabFocusByPromptPrincipal;
|
||||
|
||||
let allowFocusCheckbox; // Define outside the if block so we can bind it into the callback.
|
||||
if (principalToAllowFocusFor) {
|
||||
let hostForAllowFocusCheckbox = "";
|
||||
try {
|
||||
hostForAllowFocusCheckbox = principalToAllowFocusFor.URI.host;
|
||||
} catch (ex) { /* Ignore exceptions for host-less URIs */ }
|
||||
if (hostForAllowFocusCheckbox) {
|
||||
let allowFocusRow = document.createElementNS(XUL_NS, "row");
|
||||
allowFocusCheckbox = document.createElementNS(XUL_NS, "checkbox");
|
||||
let spacer = document.createElementNS(XUL_NS, "spacer");
|
||||
allowFocusRow.appendChild(spacer);
|
||||
let label = gBrowser.mStringBundle.getFormattedString("tabs.allowTabFocusByPromptForSite",
|
||||
[principalToAllowFocusFor.URI.host]);
|
||||
[hostForAllowFocusCheckbox]);
|
||||
allowFocusCheckbox.setAttribute("label", label);
|
||||
allowFocusRow.appendChild(allowFocusCheckbox);
|
||||
newPrompt.appendChild(allowFocusRow);
|
||||
|
Loading…
Reference in New Issue
Block a user