当点击输入文本时,键盘会弹出和弹出。我使用的是iscroll 4 cordova 1.6技术。当用户触摸文本输入时,键盘会弹出并从屏幕上消失,any1有没有预先感谢的解决方案
发布于 2012-05-12 15:36:51
问题是....app不能专注于文本区域,....whenever用户点击文本区域...
解决方案是document.getElementById('id').focus();
文本字段的id。
发布于 2012-05-16 19:27:20
为此,您需要修改iScroll.js
1)采用iScroll v4.1.9 2)将"onBeforeScrollStart“第100行的代码更改为
var target = e.target;while (target.nodeType != 1) target = target.parentNode;if (target.tagName != 'SELECT‘&& target.tagName != 'INPUT’&& target.tagName != 'TEXTAREA') e.preventDefault();
3)更改"_start“第317行的代码添加此代码
_start: function (e) {
if (e.target && e.target.type != undefined) {
var tagname = event.target.tagName.toLowerCase();
if (tagname == "input" || tagname == "button" || tagname == "textarea") {// stuff we need to allow
return;
}
}
var that = this,
point = hasTouch ? e.touches[0] : e,
matrix, x, y,
c1, c2;https://stackoverflow.com/questions/10534305
复制相似问题