Update library

This commit is contained in:
Piro / YUKI Hiroshi 2015-06-13 00:19:58 +09:00
parent daa27ee336
commit b6e4abe842

View File

@ -46,8 +46,6 @@ function visuallyselectedTabs(aTabBrowser) {
aTabBrowser.__visuallyselectedTabsInstalled = true; aTabBrowser.__visuallyselectedTabsInstalled = true;
var document = aTabBrowser.ownerDocument;
function onTabSelect(aEvent) { function onTabSelect(aEvent) {
var prevTab = aEvent.detail && aEvent.detail.previousTab; var prevTab = aEvent.detail && aEvent.detail.previousTab;
if (prevTab) if (prevTab)
@ -58,6 +56,10 @@ function visuallyselectedTabs(aTabBrowser) {
var tabsContainer = aTabBrowser.tabContainer; var tabsContainer = aTabBrowser.tabContainer;
tabsContainer.addEventListener('TabSelect', onTabSelect, false); tabsContainer.addEventListener('TabSelect', onTabSelect, false);
setVisuallySelected(aTabBrowser.selectedTab, true);
var document = aTabBrowser.ownerDocument;
document.addEventListener('unload', function onUnload(aEvent) { document.addEventListener('unload', function onUnload(aEvent) {
document.removeEventListener('unload', onUnload, false); document.removeEventListener('unload', onUnload, false);
tabsContainer.removeEventListener('TabSelect', onTabSelect, false); tabsContainer.removeEventListener('TabSelect', onTabSelect, false);