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

查看:90
本文介绍了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.

我尝试使用基本样本,这是相同的行为.在Web浏览器中或在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

这似乎是科尔多瓦用于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添加Web内容 到您的应用.不要使用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日

我也曾向苹果报告过此问题.但不幸的是,它被标记为已报告给他们的其他一些问题的重复.出于安全和隐私方面的考虑,苹果没有向我提供有关其他问题的详细信息.该问题的状态现在为已关闭"(之前为已打开").因此,希望该修复程序将被包含在即将发布的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日

我刚刚注意到,苹果公司也在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天全站免登陆