From bcca67868e6b5a0e0e3505a962dd6c2b5cdfd394 Mon Sep 17 00:00:00 2001 From: Piro / SHIMODA Hiroshi Date: Sat, 5 Nov 2011 19:50:30 +0900 Subject: [PATCH] Fix broken behavior about tabs dropped on indented area (fix for https://github.com/piroor/treestyletab/issues/175 ) --- modules/tabbarDNDObserver.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tabbarDNDObserver.js b/modules/tabbarDNDObserver.js index 5d578474..ad9e3003 100644 --- a/modules/tabbarDNDObserver.js +++ b/modules/tabbarDNDObserver.js @@ -160,7 +160,7 @@ try{ tab.parentNode != b.mTabContainer) return true; - tab = sv.getTabFromEvent(aEvent); + tab = sv.getTabFromEvent(aEvent) || sv.getTabFromTabbarEvent(aEvent); if (sv.isCollapsed(tab)) return false; @@ -246,7 +246,7 @@ catch(e) { var b = this.browser; var d = this.document; - var tab = aEvent.target; + var tab = sv.getTabFromEvent(aEvent) || sv.getTabFromTabbarEvent(aEvent) || aEvent.target; var tabs = sv.getTabsArray(b); var firstTab = sv.getFirstNormalTab(b) || tabs[0]; var lastTabIndex = tabs.length - 1;