平面UI Radiocheck插件/单选按钮不会与iOS 8.4.1切换(不再)

Seb*_*ian 10 jquery mobile-safari toggle radio-button ios

我使用的是最新版本的Flat UI Pro 1.3.2(http://designmodo.com/flat/),jQuery插件flatui-radiocheck v0.1.0和iOS设备似乎存在问题.

加载他们的演示页面时可以看到问题:http://designmodo.github.io/Flat-UI/

转到带有" Radio Buttons "的部分,然后单击两个按钮" Radio is on "和" Radio is off "切换单选按钮.这种切换(在视觉上切换状态以及DOM中的无线电元素的状态)在所有主要桌面浏览器(IE,FF,Safari(Windows))中都能正常工作.

iOS上的Safari存在问题(我在iPhone 4s上运行最新的iOS版本,8.4.1):单击两个单选按钮不再切换状态!

它似乎与iOS上的(可能是新版本)移动Safari有关,因为它在桌面浏览器上运行良好.

非常感谢有关如何调试此错误的任何想法或帮助!

小智 3

我正在使用 Flat UI Free (2.2.2) 并发现了同样的问题。

我不确定它发生的确切原因,但已经能够通过稍微调整 radiocheck 插件来修复它。

在 flat-ui.js 内部,我更改了 radiocheck 插件定义:

// Adding 'nohover' class for mobile devices
var mobile = /mobile|tablet|phone|ip(ad|od)|android|silk|webos/i.test(global.navigator.userAgent);
if (mobile === true) {
   $this.parent().hover(function () {
      $this.addClass('nohover');
   }, function () {
      $this.removeClass('nohover');
   });
}
Run Code Online (Sandbox Code Playgroud)

到:

// Adding 'nohover' class for mobile devices
if (/iPhone|iPod|iPad/i.test(global.navigator.userAgent)) { //fix for ios
   $this.addClass('nohover');
} else {
   var mobile = /mobile|tablet|phone|ip(ad|od)|android|silk|webos/i.test(global.navigator.userAgent);
   if (mobile === true) {
      $this.parent().hover(function () {
         $this.addClass('nohover');
      }, function () {
         $this.removeClass('nohover');
      });
   }    
}
Run Code Online (Sandbox Code Playgroud)

我不使用复选框,所以我不知道它们是否会受到此更改的影响。