Closed Bug 108924 Opened 23 years ago Closed 23 years ago

nsPromptService doesn't activate focused button on Enter

Categories

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

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 127892
Future

People

(Reporter: akkzilla, Assigned: jim.song)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Split off from bug 63728, since the fix for that bug only covered the <dialog> cases and doesn't cover nsPromptService: When an nsPrompt dialog comes up, it should be possible to tab to a button other than the default one (e.g. Cancel instead of OK), hit return, and have the focused button activate rather than the default button. See bug 63728 for more in-depth discussion.
Bug 83552 depended on bug 63728, so I guess it depends on this one too since this is the same issue from the user's point of view.
Blocks: focusnav
nsPromptService... sounds like a job for danm
Assignee: hewitt → danm
Target Milestone: --- → Future
Seems logic in XUL?
Akkana, Could you give us a test case?
Attached file Test Case (obsolete) (deleted) —
Attached file Test Case (deleted) —
Attached patch Patch (deleted) — Splinter Review
Please Review.
Attachment #73846 - Attachment is obsolete: true
1. you have |if(foo)...; if (bar)...;| please make the whitespace consistent (i prefer |if (bar)...;| 2. instead of having two js handlers, could you do (non mac case, obviously the mac case would be similar): <commandset> <command id="cmdEnter" if(hitOnButton) return; if (!document.getElementById('ok').disabled) doOKButton();"/> </commandset> <keyset id="dialogKeys"> <key keycode="VK_ENTER" command="cmdEnter"/> <key keycode="VK_RETURN" command="cmdEnter"/> </keyset> Advantages: * any changes to the logic are only made once in the source * ideally less js engine compiles * in theory you could set cmdEnter to disabled and make this code even cleaner.
Assignee: danm → jim.song
Please note that there is more complete JS handling (patch) for this and description of the problem contained in bug #127892.
i give up. the only other important thing is that you not mess up the mac behaviors. that said there's nothing left here ... *** This bug has been marked as a duplicate of 127892 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
marking verified as a duplicate. if you decide to reopen this bug, please clarify why. search string for bugspam removal: SalviaGuaranitica
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.

Attachment

General

Creator:
Created:
Updated:
Size: