зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1617673 - Give the root element in the bookmark properties window an id so that persistence works again r=mak
The ID was removed in Bug 1585482 and moved to the child dialog element which breaks xulstore persistence. This gives the dialog a new id and uses the original "bookmarkproperties" for the window so any existing xulstore values will work without a ui migration. Differential Revision: https://phabricator.services.mozilla.com/D65829 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f6462fdfc3
Коммит
1d2a8f18d0
|
@ -248,7 +248,7 @@ var BookmarkPropertiesPanel = {
|
|||
|
||||
// Disable the buttons until we have all the information required.
|
||||
let acceptButton = document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
acceptButton.disabled = true;
|
||||
|
||||
|
@ -265,7 +265,7 @@ var BookmarkPropertiesPanel = {
|
|||
*/
|
||||
async _initDialog() {
|
||||
let acceptButton = document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
acceptButton.label = this._getAcceptLabel();
|
||||
let acceptButtonDisabled = false;
|
||||
|
@ -369,7 +369,7 @@ var BookmarkPropertiesPanel = {
|
|||
) {
|
||||
// Check uri fields to enable accept button if input is valid
|
||||
document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept").disabled = !this._inputIsValid();
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -16,11 +16,12 @@
|
|||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
id="bookmarkproperties"
|
||||
onload="BookmarkPropertiesPanel.onDialogLoad();"
|
||||
onunload="BookmarkPropertiesPanel.onDialogUnload();"
|
||||
style="min-width: 30em;"
|
||||
persist="screenX screenY width">
|
||||
<dialog id="bookmarkproperties"
|
||||
<dialog id="bookmarkpropertiesdialog"
|
||||
buttons="accept, cancel"
|
||||
buttoniconaccept="save">
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ add_task(async function() {
|
|||
AddKeywordForSearchField,
|
||||
async function(dialogWin) {
|
||||
let acceptBtn = dialogWin.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
Assert.ok(acceptBtn.disabled, "Accept button is disabled");
|
||||
|
||||
|
@ -113,7 +113,7 @@ add_task(async function reopen_same_field() {
|
|||
AddKeywordForSearchField,
|
||||
async function(dialogWin) {
|
||||
let acceptBtn = dialogWin.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
ok(acceptBtn.disabled, "Accept button is disabled");
|
||||
|
||||
|
@ -159,7 +159,7 @@ add_task(async function open_other_field() {
|
|||
AddKeywordForSearchField,
|
||||
function(dialogWin) {
|
||||
let acceptBtn = dialogWin.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
ok(acceptBtn.disabled, "Accept button is disabled");
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ add_task(async function() {
|
|||
},
|
||||
async dialog => {
|
||||
let acceptBtn = dialog.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
Assert.ok(!acceptBtn.disabled, "Accept button is enabled");
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ add_task(async function test_cancel_with_no_changes() {
|
|||
},
|
||||
async function test(dialogWin) {
|
||||
let acceptButton = dialogWin.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() => !acceptButton.disabled,
|
||||
|
@ -93,7 +93,7 @@ add_task(async function test_cancel_with_changes() {
|
|||
},
|
||||
async function test(dialogWin) {
|
||||
let acceptButton = dialogWin.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() => !acceptButton.disabled,
|
||||
|
|
|
@ -20,7 +20,7 @@ add_task(async function test_dialog() {
|
|||
Assert.ok(dialogWin.gEditItemOverlay.readOnly, "Dialog is read-only");
|
||||
// Check that accept button is disabled
|
||||
let acceptButton = dialogWin.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.getButton("accept");
|
||||
Assert.ok(acceptButton.disabled, "Accept button is disabled");
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ gTests.push({
|
|||
// Everything worked fine, we can stop observing the window.
|
||||
self._cleanShutdown = true;
|
||||
self.window.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.cancelDialog();
|
||||
break;
|
||||
case "popupshown":
|
||||
|
@ -250,7 +250,7 @@ gTests.push({
|
|||
// Everything worked fine.
|
||||
self._cleanShutdown = true;
|
||||
self.window.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.cancelDialog();
|
||||
break;
|
||||
case "popupshown":
|
||||
|
@ -407,7 +407,7 @@ gTests.push({
|
|||
);
|
||||
|
||||
self.window.document
|
||||
.getElementById("bookmarkproperties")
|
||||
.getElementById("bookmarkpropertiesdialog")
|
||||
.cancelDialog();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -266,7 +266,7 @@ var withBookmarksDialog = async function(
|
|||
} finally {
|
||||
if (!closed && autoCancel) {
|
||||
info("withBookmarksDialog: canceling the dialog");
|
||||
doc.getElementById("bookmarkproperties").cancelDialog();
|
||||
doc.getElementById("bookmarkpropertiesdialog").cancelDialog();
|
||||
await closePromise;
|
||||
}
|
||||
// Give the dialog a little time to close itself.
|
||||
|
|
Загрузка…
Ссылка в новой задаче