ionic-team / cordova-plugin-wkwebview-engine

Mirror of Apache Cordova wkwebview engine plugin
Apache License 2.0
290 stars 69 forks source link

Angular's select doesn't work with WKWebView #26

Open 4mp3R opened 8 years ago

4mp3R commented 8 years ago

Hi guys! I noticed that after adding cordova-plugin-wkwebview-engine plugin to my project, my select widget stopped working. Basically I have an Angular select, and when I tap it a wheel picker opens with a set of available values. Once I select a value and tap outside the wheel picker, nothing happens; the select label doesn't change and neither does its model value. Any ideas on what could cause this issue and how could it be fixed?

I created this repo with some simple test code to reproduce the issue: https://github.com/4mp3R/wkwebview-test If I remove the plugin from the package.json and config.xml, run ionic state reset and then run the app on an iOS device, the select works just fine.

ionic info:

Your system information:

Cordova CLI: 6.2.0
Gulp version:  CLI version 3.9.1
Gulp local:
Ionic Framework Version: 1.3.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v4.4.7
Xcode version: Xcode 7.3.1 Build version 7D1014
gmhenderson commented 8 years ago

I am facing the same issue. The behavior is really odd, especially with multiple <select>:

recording

R1Daneel commented 8 years ago

I encountered the same problem too. Since we use different input select in our Ionic app we don't still take advantage from this plugin. I hope that this bug will be fixed asap.

NorthMcCormick commented 7 years ago

Off the top of my head, this seems to not be an issue with the plugin but WKWebView directly, so you might want to keep searching for solutions around angular/webkit quirks. I could be wrong, though.

I've had issues with angular and focuses in the past outside of ionic

gbelmm commented 7 years ago

+1 no found

vamsi-kavuri commented 7 years ago

I am facing the same issue after installing WKWebview plugin. Any workarounds?

vamsi-kavuri commented 7 years ago

Found the workaround. After adding the below code in config function, there will be a 'done' button on each select. you can update the select field by clicking on done button.

if(window.cordova && window.cordova.plugins.Keyboard) {

//Change this to false to return accessory bar cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false); } if(window.StatusBar) { // org.apache.cordova.statusbar required StatusBar.styleDefault(); }

gbelmm commented 7 years ago

perfect!!!!

gracias