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)
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.
Comment 1•25 years ago
|
||
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
Comment 2•25 years ago
|
||
Is this the behavior we want on all platforms? If you are sure it is, then
sr=attinasi
Comment 3•25 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 4•25 years ago
|
||
Still triggering onkeyup in tip build.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Reporter | ||
Comment 5•25 years ago
|
||
*sigh* sorry...not triggering onkeyup.
Comment 6•25 years ago
|
||
What test are you using? It works fine for me.
| Reporter | ||
Comment 7•25 years ago
|
||
The Show button on bugzilla.mozilla.org. Is it only fixed for <button>?
Comment 8•25 years ago
|
||
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
Updated•25 years ago
|
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
Comment 10•25 years ago
|
||
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
Updated•24 years ago
|
Priority: -- → P2
Target Milestone: mozilla1.2 → Future
Updated•24 years ago
|
QA Contact: vladimire → tpreston
Comment 11•23 years ago
|
||
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...
Comment 12•23 years ago
|
||
I can confirm that on w2k
Assignee: rods → form
Status: ASSIGNED → NEW
QA Contact: tpreston → ian
Comment 13•23 years ago
|
||
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.
Comment 14•23 years ago
|
||
sorry... I was unclear. I meant, I see the same as you, this bug works for me.
Comment 15•23 years ago
|
||
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.
Description
•