From d228191dc0f9a7794e956fddb729b9cfe5c2bd57 Mon Sep 17 00:00:00 2001 From: Piro / SHIMODA Hiroshi Date: Fri, 3 Dec 2010 22:40:52 +0900 Subject: [PATCH] kEVENT_TYPE_FOCUS_NEXT_TAB didn't used! (tab focus was not controlled anymore) --- content/treestyletab/treestyletabbrowser.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 453ea425..b949daf6 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -2306,17 +2306,13 @@ TreeStyleTabBrowser.prototype = { this._focusChangedByCurrentTabRemove = true; if ( nextFocusedTab && - !nextFocusedTab.hidden && - this._tabFocusAllowance.every(function(aFunc) { - try { - return aFunc.call(this, b); - } - catch(e) { - return false; - } - }, this) - ) - b.selectedTab = nextFocusedTab; + !nextFocusedTab.hidden + ) { + let event = document.createEvent('Events'); + event.initEvent(this.kEVENT_TYPE_FOCUS_NEXT_TAB, true, true); + if (tab.dispatchEvent(event)) + b.selectedTab = nextFocusedTab; + } } this.updateLastScrollPosition();