WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
146901
Override preventDefault() of touch/gestures in iOS Content Blocker
https://bugs.webkit.org/show_bug.cgi?id=146901
Summary
Override preventDefault() of touch/gestures in iOS Content Blocker
Dean Murphy
Reported
2015-07-13 07:53:46 PDT
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
Comment 1
2015-07-13 12:12:16 PDT
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
Comment 2
2015-07-13 12:19:19 PDT
<
rdar://problem/21798014
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug