forked from mirrors/gecko-dev
Bug 1349761 - uninitialize ctrlTab only if it has been initialized before, r=dao.
This commit is contained in:
parent
449b1552c1
commit
9721c4ea62
2 changed files with 12 additions and 11 deletions
|
|
@ -204,16 +204,17 @@ var ctrlTab = {
|
|||
},
|
||||
|
||||
uninit: function ctrlTab_uninit() {
|
||||
this._recentlyUsedTabs = null;
|
||||
this._init(false);
|
||||
if (this._recentlyUsedTabs) {
|
||||
this._recentlyUsedTabs = null;
|
||||
this._init(false);
|
||||
}
|
||||
},
|
||||
|
||||
prefName: "browser.ctrlTab.previews",
|
||||
readPref: function ctrlTab_readPref() {
|
||||
var enable =
|
||||
gPrefService.getBoolPref(this.prefName) &&
|
||||
(!gPrefService.prefHasUserValue("browser.ctrlTab.disallowForScreenReaders") ||
|
||||
!gPrefService.getBoolPref("browser.ctrlTab.disallowForScreenReaders"));
|
||||
!gPrefService.getBoolPref("browser.ctrlTab.disallowForScreenReaders", false);
|
||||
|
||||
if (enable)
|
||||
this.init();
|
||||
|
|
@ -535,15 +536,15 @@ var ctrlTab = {
|
|||
_init: function ctrlTab__init(enable) {
|
||||
var toggleEventListener = enable ? "addEventListener" : "removeEventListener";
|
||||
|
||||
window[toggleEventListener]("SSWindowRestored", this, false);
|
||||
window[toggleEventListener]("SSWindowRestored", this);
|
||||
|
||||
var tabContainer = gBrowser.tabContainer;
|
||||
tabContainer[toggleEventListener]("TabOpen", this, false);
|
||||
tabContainer[toggleEventListener]("TabAttrModified", this, false);
|
||||
tabContainer[toggleEventListener]("TabSelect", this, false);
|
||||
tabContainer[toggleEventListener]("TabClose", this, false);
|
||||
tabContainer[toggleEventListener]("TabOpen", this);
|
||||
tabContainer[toggleEventListener]("TabAttrModified", this);
|
||||
tabContainer[toggleEventListener]("TabSelect", this);
|
||||
tabContainer[toggleEventListener]("TabClose", this);
|
||||
|
||||
document[toggleEventListener]("keypress", this, false);
|
||||
document[toggleEventListener]("keypress", this);
|
||||
gBrowser.mTabBox.handleCtrlTab = !enable;
|
||||
|
||||
if (enable)
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@
|
|||
<key id="key_fullZoomReset" key="&fullZoomResetCmd.commandkey;" command="cmd_fullZoomReset" modifiers="accel"/>
|
||||
<key key="&fullZoomResetCmd.commandkey2;" command="cmd_fullZoomReset" modifiers="accel"/>
|
||||
|
||||
<key id="key_showAllTabs" command="Browser:ShowAllTabs" keycode="VK_TAB" modifiers="control,shift"/>
|
||||
<key id="key_showAllTabs" command="Browser:ShowAllTabs" keycode="VK_TAB" modifiers="control,shift" disabled="true"/>
|
||||
|
||||
<key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" />
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue