|Subject:||Any work-around? Opera 9 and keyCode|
|Posted by:||Paul Gorodyansky (paulg…@compuserve.com)|
|Date:||Thu, 14 Sep 2006|
I have function that works via onkeypressed -
for example, what to catch when a user presses a punctuation symbol
such as '.'
So I check keyCode for that - works just fine in
Opera 8, Mozilla/Firefox, IE
But in Opera 9 my code catches _both_ '.' and Delete button pressed -
both return 46 as a keyCode.
keyCode = evt.keyCode ? evt.keyCode :
evt.charCode ? evt.charCode :
evt.which ? evt.which : void 0;
CurrentKey = String.fromCharCode(keyCode) -
value is "." in _both_ cases.
In Opera 8, Mozilla/Firefox, IE the function working via
onkeypressed is NOT even called when I press Delete button...
I don't believe I am the first person to ran into this issue so
I hope some one has already figure out what to do -
don't let Opera 9 'think' that '.' was pressed when Delete button