Created attachment 209960 [details] Testcase 1.Open testcase. 2.Click link then click back. (or right-click link & then close menu - this does not show the focus problem). 3.Open new tab & close (do not right-click -> Close tab). 4.Try to close browser.
(In reply to comment #2) > Created an attachment (id=209960)  > Testcase > > 1.Open testcase. > 2.Click link then click back. > (or right-click link & then close menu - this does not show the focus > problem). > 3.Open new tab & close (do not right-click -> Close tab). > 4.Try to close browser. >
Version: unspecified → 1.5 Branch
Reproducible with the attached testcase and Firefox 184.108.40.206 RC1/20060111, File > Close and Alt+F4 close Firefox as expected.
I can also reproduce on trunk after applying a fix to bug 324946. The browser doesn't quit because (only (1) is relevant to the bug, the rest is for the curious): 1) this call fails when creating a new tab, because the focused element doesn't have a blur() method. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/content/widgets/tabbrowser.xml&rev=1.129#656 (note that there's also a focus() call later there) 2) exception is thrown, so updateCurrentBrowser doesn't finish executing; mCurrentTab doesn't get updated 3) when you close the tab, a wrong tab (#1) is passed to removeTab(). However due to this code: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/content/widgets/tabbrowser.xml&rev=1.129#1299 the correct (#2) <browser/> is removed from the tree. So after removeTab() tab #1 and browser #2 are removed from tree 4) when you try to quit, |WindowIsClosing| in browser.js causes an exception at this line: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/base/content/browser.js&rev=1.555#5648 Because the only tab in the tab strip is the former tab #2, and the browser for that tab is no longer in the tree. As goQuitApplication doesn't handle this exception, quit doesn't happen.
Component: General → Tabbed Browser
OS: Linux → All
QA Contact: general → tabbed.browser
Hardware: PC → All
Version: 1.5 Branch → Trunk
No duplicates found, confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Browser Fails to Quit & Focus is Confused - uncaught exception NS_ERROR_FAILURE → fails to exit due to updateCurrentBrowser assuming that any focusable element has a blur() method, which is not the case for arbitrary XML with xlink:href set
*** This bug has been marked as a duplicate of 323805 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.