Hybrid View
-
15 May 2007 7:28 AM #1
Tab is activated when close button clicked
Tab is activated when close button clicked
See Tabs Example 2.
When you close tab that is not the active one, it will be activated before its closed.
stopEvent() should prevent the tab from receiving the click event. but somehow this doesnt work I think.
PHP Code:/** @private */
closeClick : function(e){
var o = {};
e.stopEvent();
this.fireEvent("beforeclose", this, o);
if(o.cancel !== true){
this.tabPanel.removeTab(this.id);
}
}
-
15 May 2007 7:36 AM #2
I don't see this behavior. The click event for the close icon would fire first (even if it bubbles) and it removes the tab.
-
15 May 2007 7:40 AM #3
Hm I really do, try holding your mouse button for a sec when clicking the close button.
-
15 May 2007 8:56 AM #4
yeah tried holding the mouse button and it does what u say.
however.... if you press and hold down your mouse button, is it still considered a click?
-
15 May 2007 11:56 PM #5
Ahah! That would be a mousedown which goes through this code:
Perhaps that could check the target, and only activate if the original target was not the close button.Code:onTabMouseDown : function(e){ e.preventDefault(); this.tabPanel.activate(this.id); },
-
16 May 2007 1:55 AM #6


Reply With Quote