<?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>214970</bug_id>
          
          <creation_ts>2020-07-30 08:48:14 -0700</creation_ts>
          <short_desc>[iOS] Calling preventDefault() in a pointerdown event handler for an &lt;img&gt; does not prevent system drag</short_desc>
          <delta_ts>2020-07-30 08:51:23 -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>UI Events</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=214968</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">graouts</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hi</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1676387</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2020-07-30 08:48:14 -0700</bug_when>
    <thetext>Consider this simple markup:

&lt;img src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAQAAADa613fAAAAaUlEQVR42u3PQREAAAgDoK1/aI3g34MGNJMXKiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiJyWXmfZAEMq/KNAAAAAElFTkSuQmCC&quot; onpointerdown=&quot;event.preventDefault()&quot;&gt;

On macOS, the fact that `event.preventDefault()` is called while handling the `pointerdown` event makes it so that the image cannot be dragged. On iOS the image is draggable after a long press, but I think it should not be to match both the macOS behavior and developer expectation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1676388</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-07-30 08:48:37 -0700</bug_when>
    <thetext>&lt;rdar://problem/66329423&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1676389</commentid>
    <comment_count>2</comment_count>
      <attachid>405572</attachid>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2020-07-30 08:48:50 -0700</bug_when>
    <thetext>Created attachment 405572
Test</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1676390</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2020-07-30 08:50:11 -0700</bug_when>
    <thetext>This came up while fixing bug 214968.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1676391</commentid>
    <comment_count>4</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2020-07-30 08:51:23 -0700</bug_when>
    <thetext>Useful information from Wenson: the UI process (UIDragInteraction) mediates when to begin a drag on iOS, we’d probably just need to prod it when default is prevented for pointerdown.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>405572</attachid>
            <date>2020-07-30 08:48:50 -0700</date>
            <delta_ts>2020-07-30 08:48:50 -0700</delta_ts>
            <desc>Test</desc>
            <filename>img-pointerdown-preventdefault.html</filename>
            <type>text/html</type>
            <size>289</size>
            <attacher name="Antoine Quint">graouts</attacher>
            
              <data encoding="base64">PGltZyBzcmM9ImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFB
R1FBQUFCa0NBUUFBQURhNjEzZkFBQUFhVWxFUVZSNDJ1M1BRUkVBQUFnRG9LMS9hSTNnMzRNR05K
TVhLaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJ
aUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlJaUlpSWlKeVdYbWZaQUVN
cS9LTkFBQUFBRWxGVGtTdVFtQ0MiIG9ucG9pbnRlcmRvd249ImV2ZW50LnByZXZlbnREZWZhdWx0
KCkiPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>