我的单页网络应用程序中有一个选择元素。该应用程序采用响应式设计,可在移动设备上运行。以下是开发版的链接。
http://mapcodexpublish.com/mcxwebdev/
theselect 元素适用于所有浏览器,但 chrome for mobile 除外。 On chrome for android, when I thouch it shows the option list, but when select an option, it doesnt change at all.我试图在更改事件上发出警告,但没有触发。
我厌倦了真实的设备,但这里是模拟器的屏幕截图。这完全一样。
有没有人有类似的问题或有解决这个奇怪问题的想法?
最佳答案
似乎对我有用的 super hacky 修复是在触发更改时触发选择上的模糊事件。像这样的东西:
$('select').change(function(){
if (/Android/.test(navigator.userAgent)){
$(this).blur();
}
});
真的不为这个“修复”感到自豪,但它确实有效。
关于android - Google Chrome for Android <select> 元素不选择任何选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21110776/