Closed Thread Icon

Preserved Topic: Netscape 6 && onkeypress (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20488" title="Pages that link to Preserved Topic: Netscape 6 &amp;amp;&amp;amp; onkeypress (Page 1 of 1)" rel="nofollow" >Preserved Topic: Netscape 6 &amp;&amp; onkeypress <span class="small">(Page 1 of 1)</span>\

 
hlaford
Bipolar (III) Inmate

From: USA! USA! USA!
Insane since: Oct 2001

posted posted 04-09-2002 21:47

I have to admit that I'm stumped on this one. How does one implement keystroke filtering in Netscape 6? I can capture the key which was pressed, but I don't seem to be able to cancel the onkeypress event. I have tried returning a false value; calling event.preventDefault(); and a few other more desperate workarounds. This is one of the simpler tasks in IE so i figured that better DOM support would lend itself to easier event handling.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 04-10-2002 19:27

onkeypress sounds like one of those events that don't *need* cancelling. It's triggered by an onkeydown and then an onkeyup event happening on the same key. So, try cancelling the onkeyup event instead.

I may be totally of my rocker here, but that's what I'd try.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 04-10-2002 19:27

Actually, you might also try

e.cancelBubble();

where e is the argument that was passed to the event handler.

[This message has been edited by Slime (edited 04-10-2002).]

hlaford
Bipolar (III) Inmate

From: USA! USA! USA!
Insane since: Oct 2001

posted posted 04-12-2002 16:23

This is indeed a bug in the Netscape 6 browser. It has apparently been fixed in the current release of the Mozilla engine.

http://bugzilla.mozilla.org/show_bug.cgi?id=54035

I just downloaded 6.2.2 and the problem seems to have been cleared up.



[This message has been edited by hlaford (edited 04-15-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu