kurtisf / cordova-plugin-fix-select-popover

Cordova plugin to fix HTML select control crashes on iPad.
MIT License
4 stars 3 forks source link

Wkwebview? #1

Open adamscybot opened 8 years ago

adamscybot commented 8 years ago

The issues described here are also present on wkwebview on iOS8 (using something like teleriks wkwebview plugin).

However, the popover crash bugs still happen with both of these plugins installed. What would need to happen to allow wkwebview to work with this?

kurtisf commented 8 years ago

I was unable to reproduce a crash in WKWebView with the simple test I was running. Are you able to put a breakpoint in fixSelectPopover_presentViewController from XCode to verify that the plugin is hooked up correctly? Are you able to reliably reproduce the crash and what does your layout look like?

adamscybot commented 8 years ago

I'll give that a try shortly. What wkwebview plugin did you test with on ios8? I am on cordova-ios 3.9.2 with teleriks plugin. I know that now in cordova-ios 4+, there is an official wkwbview plugin - though this actually only loads on ios9+.

It probably is a load order thing as you suggest -- not sure how 2 seperate plugins can interact like this.

kurtisf commented 8 years ago

I tested yesterday using a sample native iOS project. I am able to reproduce the bug outside of Cordova by simply creating a WKWebView or UIWebView directly and pointing it at a website with drop down on it.

The plugin uses a 'swizzle' that will add a shim layer of code that call the original method, so both plugins should be able to run fine if they've hooked up to the same events.

You should be able to put a breakpoint in fixSelectPopover_presentViewController and see it gets hit from XCode when you open a dropdown in a Webview on an iPad.

lotar9 commented 8 years ago

Hi Kurtis,

It's also failing using your plugin in latest Cordova (6.2.0) and latest iOS (9.3.2).

I'm testing in a Cordova app (remote web files using https, and dropdowns inside an iframe). I put a breakpoint in the fixSelectPopover_presentViewController. When I tap a dropdown, XCode tries to stop in the breakpoint, but it halts. Without breakpoints, the app crashes randomly when dropdowns are tapped.

I realized that the breakpoints also stops correctly when opening another page w/o dropdowns, so it seems that your code is correctly installed in my app.

Tomorrow I'll test in a local html file w/o iframes.