canPerformAction doesnt filter `copy` selector

Originator:zkrige
Number:rdar://28337258 Date Originated:16-Sep-2016 04:36 PM
Status:open Resolved:
Product:ios Product Version:9.3.5
Classification:UI Reproducible:always
 
Area:
WebKit

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

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

Expected Results:
function should filter the copy option out of the context menu on a WKWebView

Actual Results:
Context menu still has "copy" option

Version:
ios 9.3.5

Notes:
the "share" option is also not filtered

Configuration:
iPhone 6+

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!