Bug 140207 - WKWebView should provide an API for customizing context menu
Summary: WKWebView should provide an API for customizing context menu
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-01-07 14:12 PST by Eugene But
Modified: 2020-10-10 13:48 PDT (History)
6 users (show)

See Also:


Attachments
Screenshot (40.18 KB, image/png)
2015-01-07 14:12 PST, Eugene But
no flags Details
Test App (94.06 KB, application/zip)
2015-01-07 14:13 PST, Eugene But
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene But 2015-01-07 14:12:51 PST
Created attachment 244200 [details]
Screenshot

Summary:
WKWebView should delegate the action of showing a context menu on long press and let an embedder add/customize values to the context menu (e.g. via WKUIDelegate). The embedder should also be provided information about the context in which the long press triggered the action sheet (e.g. whether it was under a hyperlink/image).

e.g. we want to handle images differently by sending them to Google Image Search

Steps to Reproduce:
1) Run the attached code
2) Long press on link


Expected Results:
An action sheet that can't be customized in native code.

Actual Results:
A delegate callback providing more information about the long press (e.g. if it was an image/text hyperlink) allowing control for showing/customizing the context menu shown
Comment 1 Eugene But 2015-01-07 14:13:32 PST
Created attachment 244202 [details]
Test App
Comment 2 Eugene But 2015-01-07 16:07:07 PST
Radar ID: 17794878