IOS 11 Beta 上cordova 的html-select 下拉问题 [英] html-select drop down issue with cordova on IOS 11 Beta

查看:23
本文介绍了IOS 11 Beta 上cordova 的html-select 下拉问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用 AngularJS 和 Cordova 构建一个 IOS 应用程序.我在 IOS 11 Beta 上试用我的应用时发现了一个错误.

I currently build an IOS application using AngularJS and Cordova. I find a bug when I tried my app on IOS 11 Beta.

要在表单中选择一些数据,我们使用 select dropDown.当我们选择一个值时,下拉列表会消失,但几秒钟后它又会出现.

To select some data in a form, we use select dropDown. When we select a value, the drop down list disappears but it appear again some seconds after.

当我的表单上有多个选择时,当点击第二个选择时,第一个被选中.然后在选择该值后出现选项的好列表.

When I have multiple select on my form, when a tap on a second select the first is selected. Then after selected the value the good list of option appear.

我尝试使用基本示例,这是相同的行为.在网络浏览器或 IOS 10 中,没有错误.

I try with basic sample and this is the same behaviour. In a web explorer or with IOS 10, there is no bug.

  <select ng-model="elements" ng-options="serie.nom for serie in elements"></select>

我尝试添加标签、更新 Cordova 和 IOS 插件.但没有任何效果.

I try to add label, Update Cordova and IOS plugins. But nothing works.

提前谢谢你.

推荐答案

我已经在下面为 Cordova 报告了这个问题:

I had reported this issue for Cordova below:

https://issues.apache.org/jira/browse/CB-13287

看起来cordova 用于IOS 的Apple UIWebView 中的错误.我与我们的一位 IOS 开发人员一起使用 Swift(没有 Cordova)创建了一个示例原生 IOS 应用程序.下拉菜单的问题也存在于此.

It appears the bug in Apple's UIWebView that cordova uses for IOS. I worked with one of our IOS developers to create a sample native IOS app using just Swift (no Cordova). The issue with the dropdown was present there too.

Apple 似乎有另一种名为 WKWebView 的视图,它似乎是从 IOS 8.0 开始的首选视图.以下引用自 Apple 的 WKWebView 文档.我已经确认 WKWebView 下的下拉菜单没有问题.

Apple seems to have another view called WKWebView, which seems to be preferred one starting from IOS 8.0. Below is the quote taken from Apple's WKWebView documentation. I have verified there is no issue with the dropdown under WKWebView.

重要

从 iOS 8.0 和 OS X 10.10 开始,使用 WKWebView 添加网页内容到您的应用程序.不要使用 UIWebView 或 WebView.

Starting in iOS 8.0 and OS X 10.10, use WKWebView to add web content to your app. Do not use UIWebView or WebView.

好在 Cordova 也支持 WKWebView.您必须安装插件:cordova-plugin-wkwebview-engine

Good thing is Cordova has support for WKWebView too. You have to install the plugin: cordova-plugin-wkwebview-engine

该插件还不是万无一失的.您可以尝试该插件是否适用于您的整个应用程序.到目前为止,WKWebView 还不是 Cordova 使用的默认视图.希望 Cordova 很快将 WKWebView 设为默认视图.他们正在跟踪 WKWebView 的所有已知问题 此处.

The plugin is not foolproof yet. You can try if that plugin works for your entire application. As of yet, WKWebView is not the default view that Cordova uses. Hopefully, Cordova will make WKWebView as default view soon. They are tracking all the known issues with WKWebView here.

更新:2017 年 11 月 3 日

我也向苹果报告了这个问题.但不幸的是,它被标记为与报告给他们的其他一些问题的重复.出于安全和隐私原因,苹果没有向我提供有关其他问题的详细信息.该问题的状态现在是 CLOSED(之前是 OPEN).因此,希望此修复程序将包含在即将发布的 IOS 更新中.

I had reported this issue to apple too. But unfortunately, it was flagged as a duplicate of some other issue reported to them. For security and privacy reasons, apple didn't provide me the details about the other issue. The status of that issue is CLOSED now (it was OPEN before). So, hopefully the fix will be shipped into the upcoming IOS updates.

更新:2018 年 2 月 1 日

我刚刚注意到 Apple 在 Xcode 9.2 下也为 UIWebView 修复了这个问题.

I just noticed that Apple has fixed this issue for UIWebView too under Xcode 9.2.

这篇关于IOS 11 Beta 上cordova 的html-select 下拉问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆