Javascript onchange works in textbox (Symbian browser)

This may apply to other mobile operating environments than Symbian ... However, the problem is that when the textarea field changes, I would like to update the counter as I type. It's easy to do this in most browsers with something like this in the textarea tag:

onkeyup="document.getElementById('size').innerHTML=this.value.length;

      

However, on Symbian, the onkeyup event doesn't work fine (it seems like all input is buffered or something). Now I can replace this with:

onblur="document.getElementById('size').innerHTML=this.value.length;

      

... This works great, but of course only updates the DIV when focus is lost (which is better than nothing, but not as good as updating as you type).

Has anyone encountered similar issues on Symbian? Any other mobile browser? Any ideas / solutions?

I've hated Symbian since I started using it - there are so many of these oddities in their APIs. I will vote for everyone who fights about Symbian .; -)

0


source to share


1 answer


In the Symbian version of the WebKit version, keyboard events unfold like a king. The only reliable way to deal with them is to install the handler in the document [!]. Now I have NOT tried this in a situation where the textarea has focus, but it definitely works with simpler controls. Basically, you use onfocus and onblur to bind / disable control-specific event handlers to the document. Of course, if you want to create a reusable widget this way, you will find yourself in a sea of ​​pain :(

OTOH, if you bother with the quirk of the little Symbian keyboard, take the gander on mouse events in Android mini-Chrome ... those go under the heading FUBAR!



... Max ...

PS. If you need more help: max-at-motovilov-dot-com. You should be able to google for this issue at forum.nokia.com but the information is not plentiful there ... this is all trial and error.

+2


source







All Articles