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)
Core
DOM: UI Events & Focus Handling
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)
189 bytes,
text/html
|
Details | |
5.46 KB,
patch
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Comment 1•23 years ago
|
||
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
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
Comment 9•23 years ago
|
||
Please note that there is more complete JS handling (patch) for this and
description of the problem contained in bug #127892.
Comment 10•23 years ago
|
||
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
Comment 11•22 years ago
|
||
marking verified as a duplicate.
if you decide to reopen this bug, please clarify why.
search string for bugspam removal: SalviaGuaranitica
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: Keyboard: Navigation → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•