You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/05/23 01:56:27 UTC

[GitHub] [cordova] bozzzi opened a new issue #111: WKWebView doesn't react on clicks (iframe) while UIWebView does - iOS

bozzzi opened a new issue #111: WKWebView doesn't react on clicks (iframe) while UIWebView does - iOS
URL: https://github.com/apache/cordova/issues/111
 
 
   <!--
   Please have a look at the issue templates you get when you click "New issue" in the GitHub UI.
   We very much prefer issues created by using one of these templates.
   -->
   
   ### Issue Type
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] Bug Report
   - [ ] Feature Request
   - [x] Support Question
   
   ## 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
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   Steps to reproduce:
   
   1. Create new cordova project
   2. Test it on UIWebView - It's working
   3. Test it on WKWebView - not working
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   ```
   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>
   ```
   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.
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   - 9.0.0 (cordova-lib@9.0.1)
   - Mac OS High Sierra 10.13.6 (17G65)
   - Xcode Version 10.1 (10B61)
   - iPhone XS, iPhone 5SE, iPhone 6S
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an `x` in the `[ ]` like so: `[x]` -->
   
   - [x] I searched for already existing GitHub issues about this
   - [x] I updated all Cordova tooling to their most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org