cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [1/9] ios commit: CB-8948 - Clipboard fix for iOS Safari copy (closes #139)
Date Tue, 19 May 2015 23:21:12 GMT
Repository: cordova-ios
Updated Branches:
  refs/heads/4.0.x c23efe162 -> 957052bbf


CB-8948 - Clipboard fix for iOS Safari copy (closes #139)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/8c1676ea
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/8c1676ea
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/8c1676ea

Branch: refs/heads/4.0.x
Commit: 8c1676ea4b7ea069b2e554020b57844ee51a6b8f
Parents: f3dfb92
Author: Mark Harding <mark@kramnorth.com>
Authored: Mon May 4 15:55:54 2015 +0100
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Tue May 5 12:40:27 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8c1676ea/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 6d81e8d..cd912e5 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -980,6 +980,13 @@
 {
     // 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"];
+    } 
 }
 
 // This method is called to let your application know that it moved from the inactive to
active state.


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


Mime
View raw message