Closed Bug 190331 Opened 22 years ago Closed 22 years ago

Hitting enter should not fire oncommand on xul checkboxes

Categories

(SeaMonkey :: Find In Page, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

Steps: 1. Go to Preferences - Advanced - Keyboard navigation 2. Type Alt+L to toggle links checkbox 3. Select OK to accept pref changes 4. Return to Keyboard navigation panel Notice that the checkbox state has changed back. The change never took affect. If you use space bar or click the checkbox it works. We use oncommand on that checkbox, because the pref is represented by a bitfield. The oncommand is not being fired. This may be a dup of bug 90318, or at least it may solve that problem if we fix this.
Resummarizing -- the problem is that hitting the accesskey clicks and focuses the checkbox (and correctly fires the oncommand), but hitting Enter for OK is triggering the oncommand a second time.
Summary: Hitting accesskey doesn't fire oncommand for xul elements → Hitting enter should not fire oncommand on xul checkboxes
adt: nsbeta1-
Keywords: nsbeta1nsbeta1-
The problem is that Enter on a buttonboxframe fires oncommand, whether the buttonboxframe is really for a button or not -- it could actually be used for a xul checkbox as well. If it's a checkbox, we don't want to fire oncommand for Enter key. This appears to be from 118 hewitt 1.13 if (NS_VK_RETURN == keyEvent->keyCode) { 119 blakeross 1.8 MouseClicked(aPresContext, aEvent); 120 } The checkin comment for 1.13 is 1.13 <hewitt@netscape.com> 18 Oct 2001 22:02 84602 - when a button has focus, enter key doesn't fire oncommand (from blake), r=hyatt, sr=hewitt However, it appears to be blake's patch.
Attachment #127164 - Flags: superreview?(hewitt)
Attachment #127164 - Flags: review?(blaker)
Comment on attachment 127164 [details] [diff] [review] Check element to make sure it's a XUL button, before using Enter key for oncommand r=hewitt
Attachment #127164 - Flags: review?(blaker) → review+
Attachment #127164 - Flags: superreview?(hewitt) → superreview?(jst)
Comment on attachment 127164 [details] [diff] [review] Check element to make sure it's a XUL button, before using Enter key for oncommand sr=jst
Attachment #127164 - Flags: superreview?(jst) → superreview+
Checked into 1.5b trunk.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
S'pose the command event could have been done in XBL...
Neil, why do we need a special kind of frame for XUL buttons anyway. Shouldn't all that functionality be implemented with XBL?
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: