mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 468168 - Session restore: click restore twice, it restores all tabs twice. r=dietrich
This commit is contained in:
parent
9cfc9f9eb3
commit
c095124efa
@ -49,9 +49,11 @@ window.onload = function() {
|
||||
if (!sessionData.value) {
|
||||
var ss = Cc["@mozilla.org/browser/sessionstartup;1"].getService(Ci.nsISessionStartup);
|
||||
sessionData.value = ss.state;
|
||||
if (!sessionData.value)
|
||||
if (!sessionData.value) {
|
||||
document.getElementById("errorTryAgain").disabled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// make sure the data is tracked to be restored in case of a subsequent crash
|
||||
var event = document.createEvent("UIEvents");
|
||||
event.initUIEvent("input", true, true, window, 0);
|
||||
@ -102,6 +104,8 @@ function initTreeView() {
|
||||
// User actions
|
||||
|
||||
function restoreSession() {
|
||||
document.getElementById("errorTryAgain").disabled = true;
|
||||
|
||||
// remove all unselected tabs from the state before restoring it
|
||||
var ix = gStateObject.windows.length - 1;
|
||||
for (var t = gTreeData.length - 1; t >= 0; t--) {
|
||||
|
Loading…
Reference in New Issue
Block a user