WKWebView disable copy and paste

how can I disable copy and paste in WKWebView?


I have tried overriding the method canPerformAction which is working well in UIWebView, but it does not work on WKWebView


override func canPerformAction(action: Selector, withSender sender: AnyObject?) -> Bool {
        if action == Selector("copy:") || action == Selector("cut:") || action == Selector("paste:") {
            return false
        }
        return super.canPerformAction(action, withSender: sender)
}


Thanks in advance

Hello


I have the same concern. it works on UIWebView but not WKWebView.

the only thing is to file a radar

I have filed a radar :

23642607

Still not corrected in 9.3

it does not work on WKWebView in ios 9.3 & ios 10
but it work on WKWebView in ios 11

WKWebView disable copy and paste
 
 
Q