diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 47c0f86e..04db6447 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -129,7 +129,8 @@ pref("extensions.treestyletab.tabbar.autoHide.contentAreaScreen.enabled", true); * Triggers for the "Auto Hide" feature. They can be controlled via the * configuration dialog. */ -pref("extensions.treestyletab.tabbar.autoHide.delay", 50); +pref("extensions.treestyletab.tabbar.autoHide.delay.show", 50); +pref("extensions.treestyletab.tabbar.autoHide.delay.hide", -1); // same to "show" pref("extensions.treestyletab.tabbar.autoHide.area", 7); pref("extensions.treestyletab.tabbar.autoShow.mousemove", true); pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown", true); diff --git a/modules/autoHide.js b/modules/autoHide.js index 65712e1f..31c8c676 100644 --- a/modules/autoHide.js +++ b/modules/autoHide.js @@ -598,6 +598,7 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, { this.showHideContentsAreaScreen(); var shouldShow = position & this.MOUSE_POSITION_SENSITIVE; + var delayToShow = utils.getTreePref('tabbar.autoHide.delay.show'); if (this.expanded) { // currently shown, let's hide it. if (shouldShow) { this.show(this.kSHOWN_BY_MOUSEMOVE); @@ -607,12 +608,15 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, { !shouldShow && utils.getTreePref('tabbar.autoShow.mousemove') ) { + let delayToHide = utils.getTreePref('tabbar.autoHide.delay.hide'); + if (delayToHide < 0) + delayToHide = delayToShow; this.showHideOnMouseMoveTimer = w.setTimeout( function(aSelf) { aSelf.cancelDelayedShowForShortcut(); aSelf.hide(aSelf.kSHOWN_BY_MOUSEMOVE); }, - utils.getTreePref('tabbar.autoHide.delay'), + delayToHide, this ); } @@ -623,7 +627,7 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, { aSelf.cancelDelayedShowForShortcut(); aSelf.show(aSelf.kSHOWN_BY_MOUSEMOVE); }, - utils.getTreePref('tabbar.autoHide.delay'), + delayToShow, this ); }