In my jquery mobile ios phonegap application, i use iscroll. On using iscroll, text boxes behave weirdly (move up and down on entering each character).
I enabled iscroll in my app by,
Added following scripts:
<script src="js/iscroll.js"></script>
<script src="js/jquery.mobile.iscrollview.js"></script>
My page looks like,
<div data-role="page" id="index">
<div data-theme="a" data-role="header" data-position="fixed" data-id="footer" data-tap-toggle="false" data-transition="none">
</div>
<div data-role="content" data-iscroll>
// following text field works weirdly
<input id="txtComment" placeholder="COMMENTS" value="" type="text" data-theme="b"/>
</div>
<div data-role="navbar" data-position="fixed" data-theme="a" data-id="footer" data-tap-toggle="false" data-transition="none">
</div>
</div>
I tried adding the following code, but didn't work
var selectField = document.getElementById('txtComment');
selectField.addEventListener('touchstart', function(e) {
e.stopPropagation();
}, false);
How can i fix it?
Please help.