Marino Faggiana 6 years ago
parent
commit
3ee0cc4a92
1 changed files with 2 additions and 2 deletions
  1. 2 2
      iOSClient/Scan/ScanCollectionView.swift

+ 2 - 2
iOSClient/Scan/ScanCollectionView.swift

@@ -281,12 +281,12 @@ class DragDropViewController: UIViewController {
     
     @objc func handleLongPressGesture(recognizer: UIGestureRecognizer) {
         
+        self.becomeFirstResponder()
+        
         let pasteboard = UIPasteboard.general
         
         if let recognizerView = recognizer.view, let recognizerSuperView = recognizerView.superview, pasteboard.hasImages {
             
-            recognizerView.becomeFirstResponder()
-
             UIMenuController.shared.menuItems = [UIMenuItem(title: "Paste", action: #selector(pasteImage))]
             UIMenuController.shared.setTargetRect(recognizerView.frame, in: recognizerSuperView)
             UIMenuController.shared.setMenuVisible(true, animated:true)