<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>146901</bug_id>
          
          <creation_ts>2015-07-13 07:53:46 -0700</creation_ts>
          <short_desc>Override preventDefault() of touch/gestures in iOS Content Blocker</short_desc>
          <delta_ts>2015-07-13 12:19:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dean Murphy">deano.uk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>benjamin</cc>
    
    <cc>deano.uk</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1109090</commentid>
    <comment_count>0</comment_count>
    <who name="Dean Murphy">deano.uk</who>
    <bug_when>2015-07-13 07:53:46 -0700</bug_when>
    <thetext>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 &apos;preventDefault()&apos; of touch/gesture overrides?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1109161</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2015-07-13 12:12:16 -0700</bug_when>
    <thetext>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&apos;ll import this too to keep track of this particular problem, but IMHO extending the platform should have the priority.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1109168</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-07-13 12:19:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/21798014&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>