<?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>218860</bug_id>
          
          <creation_ts>2020-11-12 11:09:54 -0800</creation_ts>
          <short_desc>Events delivered when all event listeners in the ancestor chain are passive should be cancelable=false</short_desc>
          <delta_ts>2022-09-12 14:40:54 -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>DOM</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=218861</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>cdumez</cc>
    
    <cc>emilio</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1706931</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-11-12 11:09:54 -0800</bug_when>
    <thetext>Wheel/touch events delivered to passive event listeners should have their `cancelable` property set to false.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1706932</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-11-12 11:10:19 -0800</bug_when>
    <thetext>&lt;rdar://problem/71334287&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1706935</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-11-12 11:11:41 -0800</bug_when>
    <thetext>Note that Chrome does this, Gecko does not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1707029</commentid>
    <comment_count>3</comment_count>
    <who name="Emilio Cobos Álvarez (:emilio)">emilio</who>
    <bug_when>2020-11-12 14:42:20 -0800</bug_when>
    <thetext>Should the cancelability of the event really depend on the listener? What do we do for other events, or if there are both passive and non-passive listeners?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1707040</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-11-12 14:56:52 -0800</bug_when>
    <thetext>https://w3c.github.io/touch-events/#cancelability

&quot;&quot;&quot;
In particular, a user agent may generate only uncancelable touch events when it observes that there are no non-passive listeners for the event.
&quot;&quot;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1707041</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-11-12 14:58:23 -0800</bug_when>
    <thetext>Corresponding spec for Wheel events:
https://w3c.github.io/uievents/#cancelability-of-wheel-events</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1707043</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-11-12 15:08:08 -0800</bug_when>
    <thetext>I filed https://github.com/w3c/uievents/issues/282 on clarifying this for wheel events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1707054</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-11-12 16:09:32 -0800</bug_when>
    <thetext>Looking at blink code, it appears (for touch events at least) to set the event to non-cancelable if all the event listeners in the ancestor chain of the target element have passive listeners. My testing suggests that the same is true for wheel event listeners.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1707117</commentid>
    <comment_count>8</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-11-12 21:33:15 -0800</bug_when>
    <thetext>Changing the event type based on the type of event listeners seem very strange &amp; weird.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1711847</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-12-03 15:05:47 -0800</bug_when>
    <thetext>We&apos;ll do this now if the event starts in the passive event listener region.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1898010</commentid>
    <comment_count>10</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-12 14:40:54 -0700</bug_when>
    <thetext>Safari is failing quite a few tests:

https://wpt.fyi/results/dom/events/non-cancelable-when-passive?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=non-cancelable</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>