Bug 409215: can sometimes get 'stuck' when trying to close tabs by repeatedly clicking the tab close button (don't skip more than one 'double click' event), r=mconnor

This commit is contained in:
gavin@gavinsharp.com 2008-03-08 16:31:39 -08:00
Родитель d3215debda
Коммит 986aa1914f
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -3168,9 +3168,18 @@
* 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.
*
* We don't want to ignore processing of more than one click event,
* though, since the user might actually be repeatedly clicking to
* close many tabs at once.
*/
if (event.detail > 1)
if (event.detail > 1 && !this._ignoredClick) {
this._ignoredClick = true;
return;
}
// Reset the "ignored click" flag
this._ignoredClick = false;
tabbedBrowser.removeTab(bindingParent);
tabbedBrowser._blockDblClick = true;