Archive

Archive for the ‘HTML5’ Category

HTML5 textbox tap issue in IPhone

July 7, 2014 1 comment

Sometimes the textbox not get focus on tap and the app gets stuck for some time.

In order to resolve this issue, include this code in document.ready

document.addEventListener("touchend", function (e) {
if (e.target.nodeName.toString().toUpperCase() == 'INPUT' || e.target.nodeName.toString().toUpperCase() == 'TEXTAREA') {
e.preventDefault();
e.target.focus();
});

Happy coding 🙂

Advertisements
Categories: HTML5