|
1、IOS11.3 fastclick.js bug导致的,修改/UI2/system/components/justep/lib/fastclick.js文件
2、320行左右,添加代码: targetElement.focus(); 添加后的代码
- /**
- * @param {EventTarget|Element} targetElement
- */
- FastClick.prototype.focus = function(targetElement) {
- 'use strict';
- var length;
- // Issue #160: on iOS 7, some input elements (e.g. date datetime) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
- if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'number' && targetElement.type !== 'time' && targetElement.type !== 'month' && targetElement.type !== 'range') {
- length = targetElement.value.length;
- targetElement.setSelectionRange(length, length);
-
- //wjw:2019-07-11,add
- /*修复bug ios 11.3不弹出键盘,这里加上聚焦代码,让其强制聚焦弹出键盘*/
- targetElement.focus();
- } else {
- targetElement.focus();
- }
- };
复制代码
|
|