Whilst working on a PlayBook port of Rareloop‘s form framework for tablets I came across an interesting quirk with how the PlayBook OS handles keyboard events in
On all desktop browsers that I’ve tested (as well as iOS and Android) events are fired for each keystroke. This is useful if you wish to perform a task as a user types input, for example autocompletion hinting. On the PlayBook however, the event is only fired when a
space key is entered and a word is completed. This seems to be the case for
keypress events on OS2, I can’t confirm whether this is new in OS2 or if its always been the case.
I’ve created a test case on JSFiddle to demonstrate the issue.
The problem has been reported to RIM, so hopefully this will be addressed in a future OS update.
Update: Thanks to Hin for pointing out in the comments that there is a work around for this bug when using
input elements. If you add the
autocomplete="off" attribute then the events fire as expected. Unfortunately this doesn’t work for
Here is an updated JSFiddle to show the fix.