confirmation message should be shown immediately, and it should not be closed by page loadings
This commit is contained in:
parent
7d891dd32c
commit
90e4852836
@ -3221,7 +3221,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
});
|
||||
}
|
||||
|
||||
var closeSetId = !structureRestored && this._restoreCloseSetId(aTab, mayBeDuplicated);
|
||||
var closeSetId = !structureRestored && this._getCloseSetId(aTab, mayBeDuplicated);
|
||||
|
||||
this.setTabValue(aTab, this.kID, id);
|
||||
this.tabsHash[id] = aTab;
|
||||
@ -3295,7 +3295,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
return [id, mayBeDuplicated];
|
||||
},
|
||||
_restoreCloseSetId : function TSTBrowser_restoreCloseSetId(aTab, aMayBeDuplicated)
|
||||
_getCloseSetId : function TSTBrowser_getCloseSetId(aTab, aMayBeDuplicated)
|
||||
{
|
||||
var closeSetId = null;
|
||||
if (!aMayBeDuplicated) {
|
||||
@ -3560,7 +3560,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
|
||||
if (behavior & this.kUNDO_ASK) {
|
||||
let self = this;
|
||||
aRestoredTab.addEventListener('SSTabRestored', function(aEvent) {
|
||||
aRestoredTab.addEventListener('SSTabRestoring', function(aEvent) {
|
||||
aRestoredTab.removeEventListener(aEvent.type, arguments.callee, false);
|
||||
self.askUndoCloseTabSetBehavior(aRestoredTab, indexes.length)
|
||||
.next(function(aBehavior) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @fileOverview Tab Related Confirmation Library for Firefox 3.5 or later
|
||||
* @author SHIMODA "Piro" Hiroshi
|
||||
* @version 5
|
||||
* @version 7
|
||||
* Basic usage:
|
||||
*
|
||||
* @example
|
||||
@ -72,7 +72,7 @@ if (typeof namespace.Deferred == 'undefined')
|
||||
|
||||
var confirmWithTab;
|
||||
(function() {
|
||||
const currentRevision = 6;
|
||||
const currentRevision = 7;
|
||||
|
||||
var loadedRevision = 'confirmWithTab' in namespace ?
|
||||
namespace.confirmWithTab.revision :
|
||||
@ -177,6 +177,9 @@ var confirmWithTab;
|
||||
notification.appendChild(container);
|
||||
}
|
||||
|
||||
if (aOptions.persistence)
|
||||
notification.persistence = aOptions.persistence;
|
||||
|
||||
var strip = b.tabContainer || b.mTabContainer;
|
||||
var handleEvent = function handleEvent(aEvent) {
|
||||
if (aEvent.type == 'DOMNodeRemoved' && aEvent.target != notification)
|
||||
|
@ -684,6 +684,7 @@ var TreeStyleTabUtils = {
|
||||
this.treeBundle.getString('undoCloseTabSetBehavior.set'),
|
||||
this.treeBundle.getString('undoCloseTabSetBehavior.separate')
|
||||
],
|
||||
persistence : -1, // don't hide automatically by page loadings
|
||||
checkbox : checkbox,
|
||||
cancelEvents : ['TabClose', 'SSTabRestoring']
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user