我正在检查我在装有 iOs 5.1 的 Ipad 中的应用程序 当我点击 textarea 时,光标会跳到书写线上方两行。 虽然焦点位于正确的位置,但光标的视觉外观出现在焦点线上方两行。 对此有任何建议。
This is HTML part taken from firebug not from file(you can see tag names) video to show problem(video is not made by me , but problem is similar)
最佳答案
iPad 可能在 touch
事件上有一些偏移,你可以用这样的函数取消它:
$('#yourTextarea').on('touchstart', function (event) {
event.preventDefault(); //should prevent the hop
// rest of your code goes here
});
关于javascript - iPad 光标在文本区域跳跃(位移),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10499893/