Hi,
We are using following simple HTML element on one web page
If user press key other than enter then we are setting text box text blank. This works fine with all browsers but its not working with tablet-pc.
Can anyone please advise how to handle keypress event for tablet-pc through normal javascript or jquery ?
This is general issue so I have posted it here in case if someone has already faced and resolved it.
Thanks
Prasad
How to handle javascript keypress event for tablet-PC
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Dec 5, 2013, 6:55 PM EST
For touch devices, you have to use ontouchstart, ontouchend, ontouchmove events.
For example,
document.body.addEventListener('touchstart', function(e){
var touchlist = e.touches
for (var i=0; i
}
}, false)
More details here
Prasad Godbole153 reputationPosted Dec 19, 2013, 8:41 PM EST
Thanks for giving info. I think for this we will need mobile/touch screen based Jquery.
We used keydown event instead of keypress and its seems to be working.
Thanks and Regards
Prasad