You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2018/01/22 20:17:39 UTC

[cordova-ios] branch master updated: CB-13510: (iOS) Removed clipboard workaround, which was braking copy/paste functional iOS 11 (#352)

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

purplecabbage 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 2e51796  CB-13510: (iOS) Removed clipboard workaround, which was braking copy/paste functional iOS 11 (#352)
2e51796 is described below

commit 2e51796fa6d4acf5fecd17fe08bdfb1224761b8f
Author: ssraza <ss...@gmail.com>
AuthorDate: Mon Jan 22 12:17:36 2018 -0800

    CB-13510: (iOS) Removed clipboard workaround, which was braking copy/paste functional iOS 11 (#352)
    
    * Removed clipboard workaround, which was braking copy/paste functionality in iOS 11. CB-13510
---
 CordovaLib/Classes/Public/CDVViewController.m | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index d0c0586..d467b49 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -739,12 +739,14 @@
 {
     // NSLog(@"%@",@"applicationWillEnterForeground");
     [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resume');"];
-
-    /** Clipboard fix **/
-    UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
-    NSString* string = pasteboard.string;
-    if (string) {
-        [pasteboard setValue:string forPasteboardType:@"public.text"];
+    
+    if (!IsAtLeastiOSVersion(@"11.0")) {
+        /** Clipboard fix **/
+        UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
+        NSString* string = pasteboard.string;
+        if (string) {
+            [pasteboard setValue:string forPasteboardType:@"public.text"];
+        }
     }
 }
 

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

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