Closed
Bug 62879
Opened 25 years ago
Closed 25 years ago
event.which returns 0 for CR instead of 13
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
People
(Reporter: bsmith, Assigned: rogerl)
Details
1. In response to an onKeyPress event, the which property of the event returns
0 instead of 13 when a CR is entered. In NS 4.76, it returns the expected value
of 13.
Use the following code to reproduce the problem:
<HTML><BODY>
<FORM>
Type a character:
<INPUT TYPE="text"
SIZE=1
ONKEYPRESS="alert ('event.which = ' + event.which);return false">
</FORM>
</BODY></HTML>
2. Note also that after setting the keyboard focus to the input field, typing a
char, and clearing the alert window, typing another char does nothing. I can
only assume that the keyboard focus is no longer in the input field anymore
although the text cursor is blinking there. To repeat the test with another
char, you must once again click in the input field to set the keyboard focus
there. This behavior also is different from NS 4.76.
I encountered this bug in a real world application which traps the CR in the
text field in order to submit the form.
Comment 1•25 years ago
|
||
Duplicate of 62878 marking as such.
*** This bug has been marked as a duplicate of 62878 ***
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•