Closed bozzzi closed 5 years ago
WKWebView doesn't react on clicks (iframe) while UIWebView does Similar question: https://stackoverflow.com/questions/51175746/wkwebview-doesnt-react-on-clicks-while-uiwebview-does?answertab=oldest#tab-top
Steps to reproduce:
cordova create hello com.example.hello HelloWorld cd HelloWorld cordova platform add ios
Open project in Xcode and change receivedEvent: function from index.html file accordingly (Just adding simple DFP add - js api)
receivedEvent: function(id) { googletag.cmd.push(function() { googletag.defineSlot('/271507443/patuljak-aplikacija-b2', [300, 250], 'here').addService(googletag.pubads()).setCollapseEmptyDiv(true); googletag.pubads().enableSingleRequest(); googletag.enableServices(); googletag.display('here'); }); }
create empty div in body of index.html file
<div id="here"></div>
Add to head of index.html file
<script async='async' src='https://www.googletagservices.com/tag/js/gpt.js'></script> <script> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; </script>
Run project in xcode... Everything should be running fine in UIWebView.
Now, add WKWebView plugin
cordova plugin add cordova-plugin-wkwebview-engine
After successful installation, you should have, inside config.xml file:
<feature name="CDVWKWebViewEngine"> <param name="ios-package" value="CDVWKWebViewEngine" /> </feature> <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
Run project again, it is not possible to click on add in WKWebView
If wkwebview plugin removed everything works fine again. Working OK in browser too.
Issue in the correct repo: https://github.com/apache/cordova-plugin-wkwebview-engine/issues/98
Issue Type
Description
WKWebView doesn't react on clicks (iframe) while UIWebView does Similar question: https://stackoverflow.com/questions/51175746/wkwebview-doesnt-react-on-clicks-while-uiwebview-does?answertab=oldest#tab-top
Information
Steps to reproduce:
Command or Code
Open project in Xcode and change receivedEvent: function from index.html file accordingly (Just adding simple DFP add - js api)
create empty div in body of index.html file
Add to head of index.html file
Run project in xcode... Everything should be running fine in UIWebView.
Now, add WKWebView plugin
After successful installation, you should have, inside config.xml file:
Run project again, it is not possible to click on add in WKWebView
If wkwebview plugin removed everything works fine again. Working OK in browser too.
Environment, Platform, Device
Version information
Checklist