This is an automated email from the ASF dual-hosted git repository.

shazron pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/master by this push:
     new 191c17e  CB-14076: Setting UIWebViewDelegate on 
CDVWebViewEngineProtocol doesn't work (#365)
191c17e is described below

commit 191c17e346b1abca2b862f031ea5e78c89e1b5c7
Author: Dan Polivy <d...@cellartracker.com>
AuthorDate: Mon May 14 18:34:21 2018 -0700

    CB-14076: Setting UIWebViewDelegate on CDVWebViewEngineProtocol doesn't 
work (#365)
    
    Attempts to use `CDVWebViewEngineProtocol::updateWithInfo` to set a new 
`UIWebViewDelegate` were not working; instead of setting the passed in 
delegate, it was setting the `CDVViewController` instance as the delegate 
instead.
    
    This commit fixes the code so that the proper delegate is ultimately passed 
in to the `UIWebView`.
---
 .../Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m 
b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m
index f571d80..bbd343c 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m
+++ b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m
@@ -176,7 +176,7 @@
 
     if (uiWebViewDelegate &&
         [uiWebViewDelegate conformsToProtocol:@protocol(UIWebViewDelegate)]) {
-        self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] 
initWithDelegate:(id <UIWebViewDelegate>)self.viewController];
+        self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] 
initWithDelegate:(id <UIWebViewDelegate>)uiWebViewDelegate];
         uiWebView.delegate = self.uiWebViewDelegate;
     }
 

-- 
To stop receiving notification emails like this one, please contact
shaz...@apache.org.

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

Reply via email to