Bug 378344 - Triple clicking the tabbar can open a tab and close it again right away p=Dao Gottwald <dao@design-noir.de> r=mano

This commit is contained in:
asqueella@gmail.com 2007-08-21 22:02:35 -07:00
parent c2d28a3ece
commit a976fa9afd

View File

@ -3163,11 +3163,14 @@
* can be dispatched on an in-tab close button is when it is shown
* after the first click (i.e. the first click event was dispatched
* on the tab). This happens when we show the close button only on
* the active tab; in which case, it is most likely that the close
* button area has been accidentally clicked, therefore we do not
* close the tab. See bug 352021 for no details.
* the active tab. (bug 352021)
* The only sequence in which a third click event can be dispatched
* on an in-tab close button is when the tab was opened with a
* double click on the tabbar. (bug 378344)
* In both cases, it is most likely that the close button area has
* been accidentally clicked, therefore we do not close the tab.
*/
if (event.detail == 2)
if (event.detail > 1)
return;
tabbedBrowser.removeTab(bindingParent);