Bug 146901
| Summary: | Override preventDefault() of touch/gestures in iOS Content Blocker | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Dean Murphy <deano.uk> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Enhancement | CC: | achristensen, benjamin, deano.uk, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | iPhone / iPad | ||
| OS: | Other | ||
Dean Murphy
Some websites are using preventDefault() on touch/gesture evens within javascript to prevent the callout menu.
For example: If you visit news.google.com on an iPhone, you are unable to long-tap the hyperlinks to copy link/open in new tab/add to reading list. The only workaround I can find for this particular website is to refresh into a desktop view.
The particular script that handles these events can be blocked via content blocker, however blocking the whole script affects the page loading correctly as overriding touch handlers are a small part of what the script as a whole does.
Maybe have an option within the blockerList.json to ignore 'preventDefault()' of touch/gesture overrides?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Benjamin Poulain
This one is very tricky.
There are many valid use cases for calling preventDefault() on touch events. I suspect we would mostly break content if rules start ignore it.
A problem is that we do not provide a way for the page to only cancel certain native gestures. It is quite possible the long press is only cancelled as a by-product of another gesture handling.
I'll import this too to keep track of this particular problem, but IMHO extending the platform should have the priority.
Radar WebKit Bug Importer
<rdar://problem/21798014>