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
Loading
Prasad GodbolePosted Dec 20, 2013, 1:41 AM
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
Jaganathan BantheswaranPosted Dec 5, 2013, 11:55 PM
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