ClientScripting VerifyListener determine keystroke [message #997103] |
Thu, 03 January 2013 17:03 |
|
I'm using ClientScripting to write a JavaScript VerifyListener for a complex numeric field, which works well for most cases, but I need to get the event.keyCode pressed to determine if the key stroke should be ignored or not (if unwanted, then I'll set event.doit = false).
This works perfectly if characters are typed anywhere in the field, but if I highlight one or more existing chars in the field, then type (thus replacing the existing chars), I don't get the new keyCode - it just comes back as 0.
Is this a bug in RAP/ClientScripting, or something else I can do to determine the keyCode pressed?
I was using a nightly RAP 2.0 M3 build, but have updated to M4 - still the same issue.
Thanks, John
---
Just because you can doesn't mean you should
|
|
|
Re: ClientScripting VerifyListener determine keystroke [message #997179 is a reply to message #997103] |
Fri, 04 January 2013 09:52 |
|
...at least I thought ClientScripting was working with M4, but isn't now... I probably got confused between my normal VerifyListener and the ClientScripting code... I'll pull the nightly M4 and latest ClientScripting together to see if the problem still exists... but it looks like none of the ClientScriping is being invoked at all. No messages in browser console as far as I can see either.
---
Just because you can doesn't mean you should
|
|
|
Re: ClientScripting VerifyListener determine keystroke [message #997193 is a reply to message #997179] |
Fri, 04 January 2013 11:35 |
|
Yup, just to confirm that ClientScripting is working again using nightly builds of RAP 2.0 M4 and ClientScripting from last night.
However, the original issue from this post still stands i.e. if you REPLACE characters in a field rather than just inserting or appending new chars, the Verify event in ClientScripting's JavaScript is triggered, but event data (event.character and event.keyCode) is not populated... should I raise this as a bug, or am I expecting it to work when it is not intended to.
Thanks, John
---
Just because you can doesn't mean you should
|
|
|
|
Powered by
FUDForum. Page generated in 0.03974 seconds