We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: 移动端使用fastclick之后,在ios环境下,有几个连续的下拉框 第一个select框突然填充了第二个下拉框的内容。
A:根本原因是Fastclick导致IOS下多个 select ,点击某一个,焦点不停变换的bug。修改源码,在onTouchStart事件内判断设备是否为IOS,再判断当前nodeName是否为select,如果是return false去阻止fastClick执行其他事件
github源码地址:fastclick.js
//line 391行 FastClick.prototype.onTouchStart = function(event) { //在其方法中添加判断 符合ios select的时候 不返回事件 if(deviceIsIOS&&this.targetElement =="select") this.targetElement = null event.preventDefault(); } //line521 或者讲源码中 有关touchEnd判断非ios或者非select的事件注释, if (!deviceIsIOS || targetTagName !== 'select') { this.targetElement = null; event.preventDefault(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Q: 移动端使用fastclick之后,在ios环境下,有几个连续的下拉框 第一个select框突然填充了第二个下拉框的内容。
A:根本原因是Fastclick导致IOS下多个 select ,点击某一个,焦点不停变换的bug。修改源码,在onTouchStart事件内判断设备是否为IOS,再判断当前nodeName是否为select,如果是return false去阻止fastClick执行其他事件
github源码地址:fastclick.js
The text was updated successfully, but these errors were encountered: