<?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>226683</bug_id>
          
          <creation_ts>2021-06-05 08:16:47 -0700</creation_ts>
          <short_desc>Wheel event is not fired on any SVG element</short_desc>
          <delta_ts>2026-03-19 19:53:58 -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>SVG</component>
          <version>Safari 14</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 10.14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>309293</dup_id>
          <see_also>https://github.com/d3/d3/issues/3035</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jay Wang">xiao.hk1997</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adodson</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>karlcow</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>victor.anan17</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1767130</commentid>
    <comment_count>0</comment_count>
    <who name="Jay Wang">xiao.hk1997</who>
    <bug_when>2021-06-05 08:16:47 -0700</bug_when>
    <thetext>I am trying to bind a wheel event listener to a SVG group element with D3. It seems the wheel event is not triggered when I scroll on the group element in Safari (the group is not empty). It works fine on Firefox or Chrome.

For a demo, see this codepen (https://codepen.io/xiaohk/pen/oNZdwoO).

Interestingly, it works as expected if the wheel event listener is bound to the SVG element instead of one &lt;g&gt; element.

For example, see this codepen (https://codepen.io/xiaohk/pen/vYxjZdY)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767133</commentid>
    <comment_count>1</comment_count>
    <who name="Jay Wang">xiao.hk1997</who>
    <bug_when>2021-06-05 08:19:53 -0700</bug_when>
    <thetext>Here is a related question on stack overflow (https://stackoverflow.com/questions/67836886/wheel-event-is-not-fired-on-a-svg-group-element-in-safari)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767532</commentid>
    <comment_count>2</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-06-07 13:24:25 -0700</bug_when>
    <thetext>This is actually applied to &lt;rect&gt; element as well which suggests the bug is applied to all SVG elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767533</commentid>
    <comment_count>3</comment_count>
      <attachid>430775</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-06-07 13:25:11 -0700</bug_when>
    <thetext>Created attachment 430775
reduced test case

This test case shows the bug can happen with the SVG &lt;rect&gt; element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1768753</commentid>
    <comment_count>4</comment_count>
    <who name="Victor Ananiev">victor.anan17</who>
    <bug_when>2021-06-10 14:55:49 -0700</bug_when>
    <thetext>I found that binding first a wheel event to a containing HTML element (like &apos;SVG&apos; or document.body) makes this working.
See my comment on stack overflow (https://stackoverflow.com/questions/67836886/wheel-event-is-not-fired-on-a-svg-group-element-in-safari).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1769199</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-12 08:17:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/79240222&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894030</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-08-26 12:19:14 -0700</bug_when>
    <thetext>This is because we don&apos;t build event regions inside SVG content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2191907</commentid>
    <comment_count>7</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-03-19 19:53:58 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 309293 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>430775</attachid>
            <date>2021-06-07 13:25:11 -0700</date>
            <delta_ts>2021-06-07 13:25:11 -0700</delta_ts>
            <desc>reduced test case</desc>
            <filename>svg-wheel-event.html</filename>
            <type>text/html</type>
            <size>869</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">PHN0eWxlPgogICAgYm9keSB7CiAgICAgICAgaGVpZ2h0OiAyMDAwcHg7CiAgICB9Cjwvc3R5bGU+
Cjxib2R5PgogICAgPGgzPiZsdDtkaXYmZ3Q7OjwvaDM+CiAgICA8ZGl2IGlkPSJkaXYiIHN0eWxl
PSJ3aWR0aDoxMDBweDsgaGVpZ2h0OjEwMHB4OyBiYWNrZ3JvdW5kLWNvbG9yOiBncmVlbjsgZGlz
cGxheTogaW5saW5lLWJsb2NrOyI+PC9kaXY+CiAgICA8YnI+CiAgICA8aDM+Jmx0O3JlY3QmZ3Q7
OjwvaDM+CiAgICA8c3ZnIHN0eWxlPSJ3aWR0aDoxMDBweDsgaGVpZ2h0OjEwMHB4OyI+CiAgICAg
ICAgPHJlY3QgaWQ9InJlY3QiIHdpZHRoPSIxMDAiIGhlaWdodD0nMTAwJyBmaWxsPSdkYXJrb3Jh
bmdlJy8+CiAgICA8L3N2Zz4KICAgIDxwPiZ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