block to select tab for clicking on the twisty, without eval()
This commit is contained in:
parent
7ea751f9fb
commit
cf058c1b18
@ -370,18 +370,6 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
window['piro.sakura.ne.jp'].tabsDragUtils.initTabBrowser(b);
|
window['piro.sakura.ne.jp'].tabsDragUtils.initTabBrowser(b);
|
||||||
|
|
||||||
|
|
||||||
eval('b.mTabContainer._selectNewTab = '+
|
|
||||||
b.mTabContainer._selectNewTab.toSource().replace(
|
|
||||||
'{',
|
|
||||||
<![CDATA[$&
|
|
||||||
if (arguments[0].__treestyletab__preventSelect) {
|
|
||||||
arguments[0].__treestyletab__preventSelect = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
]]>
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
eval('b.mTabContainer.adjustTabstrip = '+
|
eval('b.mTabContainer.adjustTabstrip = '+
|
||||||
b.mTabContainer.adjustTabstrip.toSource().replace(
|
b.mTabContainer.adjustTabstrip.toSource().replace(
|
||||||
/(\}\)?)$/,
|
/(\}\)?)$/,
|
||||||
@ -3133,7 +3121,8 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
aEvent.button == 0 &&
|
aEvent.button == 0 &&
|
||||||
this.isEventFiredOnTwisty(aEvent)
|
this.isEventFiredOnTwisty(aEvent)
|
||||||
) {
|
) {
|
||||||
this.getTabFromEvent(aEvent).__treestyletab__preventSelect = true;
|
// prevent to select the tab for clicking on twisty
|
||||||
|
aEvent.stopPropagation();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.onMozMouseHittest(aEvent);
|
this.onMozMouseHittest(aEvent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user