Closed Bug 36062 Opened 26 years ago Closed 25 years ago

onkeypress not valuing 'which' properly (always 0)

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: chris, Assigned: joki)

References

()

Details

(Whiteboard: [fixinhand][nsbeta3-])

when interrogating the 'which' property of the event object generated by an onkeypress event I am always getting the value of 0. For comparison, using the onkeydown returns the proper value (the key's charcode). Simplified test case already available at http://placenamehere.com/chris/temp/onkeypress.html
Key events are no longer part of DOM Level 2. However, this would probably be nice, if which is what should hold the key code (I'm not sure of that).
setting to New
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is simple and 4xp. Nominating nsbeta3. The fix should take five minutes.
Status: NEW → ASSIGNED
Keywords: 4xp, nsbeta3
Okay, I have a fix. It gets us very close to 4x behavior with some variations due to compliance with the early DOM 2 key specs.
Whiteboard: [fixinhand]
joki--can you attach a patch?
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
So what code will event.which yield in Mozilla? At the moment, with onkeydown and onkeyup it gives the code of the pressed key irrespective of whether e.g. shift is pressed. This is how it is handled in IE, but not in Netscape 4. As long as there is no W3C specification I would prefer backward compatibility...
Could I get an update as to when this fix will make it into a build?
Marking nsbeta3+
Whiteboard: [fixinhand] → [fixinhand][nsbeta3+]
I get a 404 not found error when I try to access the above url. Joki's fix has been checked in. Can anybody else provide a test case, or better yet, use the latest nightly build and figure out whether this bug is fixed? Regardless, we are not going to spend more time on this pre Netscape 6 ship. This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration, but do not clear the nsbeta3- nomination.
Whiteboard: [fixinhand][nsbeta3+] → [fixinhand][nsbeta3-]
Target Milestone: --- → Future
I tested it with build 2000081308 on win98 and it seems to work well now. I think status can be set to fixed.
sorry about that... I've made some major changes to my site and must have clobbered the temp directory... I'll reupload the test case to the URL specified this evening (EST)
I have re-uploaded the test case and have made the appropriate changes to the URL in this bug report. After uploading the test case this evening I first hit the url with my copy of M16 confirming that I grabbed the right file out of my backups (cause I got 0 all the time). I have also done some preliminary testing with the most recent nightly (windows talkback build 2000081508) and it seems to be fixed. The script that spawned this bug is also now working and can be found at: http://www.placenamehere.com/chris/experiments/glyphs/coolGlyphs.html
Per comments, marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Updating QA Contact.
QA Contact: ckritzer → lorca
Reassigning QA Contact for all open and unverified bugs previously under Lorca's care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
QA contact updated
QA Contact: gerardok → madhur
verified on build 2001-08-10-trunk
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.