Closed Bug 68850 Opened 25 years ago Closed 23 years ago

[HLP][MF]Spacebar should only trigger HTML button on keyup

Categories

(Core :: Layout: Form Controls, defect, P2)

x86
Windows 2000
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: bugzilla, Unassigned)

Details

Build ID: trunk (tip) HTML buttons should only be triggered when pressing spacebar on keyup, to match Windows and our own chrome. They currently trigger on keydown.
Patch: Index: nsHTMLButtonElement.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/content/src/nsHTMLButtonElement.cpp,v retrieving revision 1.67 diff -u -r1.67 nsHTMLButtonElement.cpp --- nsHTMLButtonElement.cpp 2001/02/06 02:31:31 1.67 +++ nsHTMLButtonElement.cpp 2001/02/16 15:18:24 @@ -386,13 +386,13 @@ !(aFlags & NS_EVENT_FLAG_CAPTURE)) { switch (aEvent->message) { - case NS_KEY_PRESS: + case NS_KEY_UP: { // For backwards compat, trigger buttons with space or enter // (bug 25300) nsKeyEvent * keyEvent = (nsKeyEvent *)aEvent; if (keyEvent->keyCode == NS_VK_RETURN || - keyEvent->charCode == NS_VK_SPACE) { + keyEvent->keyCode == NS_VK_SPACE) { nsEventStatus status = nsEventStatus_eIgnore; nsMouseEvent event; event.eventStructType = NS_MOUSE_EVENT;
Status: NEW → ASSIGNED
Keywords: patch
Summary: Spacebar should only trigger HTML button on keyup → [MF][FIX]Spacebar should only trigger HTML button on keyup
Whiteboard: Fix in hand
Is this the behavior we want on all platforms? If you are sure it is, then sr=attinasi
fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Still triggering onkeyup in tip build.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
*sigh* sorry...not triggering onkeyup.
What test are you using? It works fine for me.
The Show button on bugzilla.mozilla.org. Is it only fixed for <button>?
I assumed that HTML button only meant HTML 4 buttons, I guess I should have tested input btns also
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla0.9.1
Summary: [MF][FIX]Spacebar should only trigger HTML button on keyup → [MF][FIX?]Spacebar should only trigger HTML button on keyup
Whiteboard: Fix in hand
QA Contact Update
QA Contact: bsharma → vladimire
It doesn't appear that the key event is getting to the nsHTMLInputElement object (at least the KEY_PRESS event isn't) I thought this would be a slam dunk, oops, setting to 0.9.3
Summary: [MF][FIX?]Spacebar should only trigger HTML button on keyup → [HLP][MF]Spacebar should only trigger HTML button on keyup
Target Milestone: mozilla0.9.1 → mozilla1.2
Priority: -- → P2
Target Milestone: mozilla1.2 → Future
QA Contact: vladimire → tpreston
Is this still an issue? The submit input on this very form only triggers on keyup in Linux trunk build 2003-11-03-05 (that is, the submit does not seem to start till I release the spacebar). I can't test on Windows, unfortunately...
I can confirm that on w2k
Assignee: rods → form
Status: ASSIGNED → NEW
QA Contact: tpreston → ian
Odd. See http://lxr.mozilla.org/seamonkey/source/content/html/content/src/nsHTMLInputElement.cpp#1529 -- we should be doing the right thing here... and the frame is not doing any weird key handling here.
sorry... I was unclear. I meant, I see the same as you, this bug works for me.
Ah, ok. Excellent. ;)
Status: NEW → RESOLVED
Closed: 25 years ago → 23 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.