Open Bug 670053 Opened 13 years ago Updated 1 month ago

unresponsive window due to confused focus tracking (including mochitest "Unable to restore focus") after closing a window with open popup (context menu or select)

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: karlt, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files)

Attached patch mochitestSplinter Review
The attached mochitest opens a window, opens a context menu on that window
then closes the (first) window.

This works fine on Mac and X11, but explicitly closing the context menu
is necessary on NT.  Without that workaround, the message "Unable to restore focus, expect failures and timeouts" is issued on the next test.

That next test passes (test_bug649840.xul doesn't need focus) but then
test_button.xul times out waiting for focus.  Then test_chromemargin.xul is
the last test to issue the "Unable to restore focus" message, and things seem
to recover, probably because test_chromemargin.xul opens a new window.

Perhaps this is an XP Toolkit/Widgets issue (select popups don't seem to
demonstrate this problem) but I'm filing in Widget:Win32 because of the
platform-specific nature.
Disabling test_bug665540.html on WINNT has been pushed:
http://hg.mozilla.org/mozilla-central/rev/2baf8679871d

Not marking the bug fixed assuming some actions might still be needed.
Summary: mochitest "Unable to restore focus" after closing a window with context menu open → unresponsive window due to confused focus tracking (including mochitest "Unable to restore focus") after closing a window with open popup (context menu or select)
Attached file simple testcase
1. Options -> Tabs -> disable "Open new windows in a new tab instead".
2. Open attachment and follow instructions.

Results: Sides and bottom of first window look focused but the titlebar does not, and the window is unresponsive.

Expected result: Same as if the select were not opened.
I don't know why, but this test-only changeset caused test_bug665540.html to start demonstrating this bug.
http://hg.mozilla.org/integration/mozilla-inbound/rev/5dfcc562b0a9
Added a workaround to enable test_bug665540.html on WINNT.
http://hg.mozilla.org/integration/mozilla-inbound/rev/4ee36bb66230
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: