Closed Bug 62379 Opened 24 years ago Closed 24 years ago

Modal dialogs don't properly return focus to their callers when dismissed

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 54936

People

(Reporter: bugzilla, Assigned: saari)

References

Details

(Keywords: access, platform-parity)

not sure if this is already a known problem --i've managed to see this on win32
[ie, winNT] only, not on linux or mac. pls reassign as needed. thx!

here are a couple recipes which i think might be caused by the same issue [but
lemme know if they are indeed seperate].

recipe #1: using Find
1. bring up the Find in this Page dialog [eg, ctrl+F].
2. enter a string that'll result in a "text not found" --eg, blahblahblah.
3. hit the Enter key. result [as expected]: an alert dialog saying "The text you
entered was not found."
4. hit the Enter key. result [again as expected]: the alert dialog is dismissed.
5. attempt to dismiss the Find dialog using either the Enter or Escape keys.

result: you can't dismiss the Find dialog. nothing happens when doing that. need
to use mouse to click the buttons.

recipe #2: Open Web Location dialog
1. bring up the Open Web Location dialog [eg, ctrl+L].
2. enter a bogus URL, eg, www.fnord.zabble
3. hit Enter key to open the location. result [as expected]: the Open Web
Location dialog goes away, then you get an alert dialog saying that the location
doesn't exist.
4. attempt to dismiss the alert dialog by hitting Enter.

result: you cannot dismiss the alert dialog with the keyboard. need to use the
mouse to click the OK button.
Keywords: access, correctness, pp
I have been seeing this also.  It happens with more than just these two 
dialogs; it seems that whenever you open a modal dialog and then dismiss it, 
focus seems to be back at the parent window (e.g. it's drawn there, or a 
textfield there has the caret), but it's really not.  This is also evident if 
you press tab in an alert to set focus to the OK button, then press spacebar to 
dismiss the alert, then try to navigate the caller window via the keys.

It's also not restricted to just keyboard navigation, since the parent still 
doesn't (but appears to) have focus even if you dismiss the modal dialog with 
the mouse.
Summary: Enter and Escape key won't work in Alert dialogs [after !found situations → Modal dialogs don't properly return focus to their callers when dismissed
Yes, this is a dup. Yes, it is broken on all dialogs under Windows. No, the fix
is not easy... the problem is caused by a workaround for a Windows OS bug with
dialog parenting.
blake, saari: thanks much for the clarification! anyone know what the original
bug is for this? (as there are several dialog modality bugs... :)
*** Bug 62664 has been marked as a duplicate of this bug. ***

*** This bug has been marked as a duplicate of 54936 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
VERIFIED duplicate.
Status: RESOLVED → VERIFIED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.