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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18542</bug_id>
          
          <creation_ts>2012-08-13 06:03:24 +0000</creation_ts>
          <short_desc>onmousewheel attribute should be replaced with onwheel</short_desc>
          <delta_ts>2015-07-09 12:10:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Masayuki Nakano">masayuki</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>hsivonen</cc>
    
    <cc>m.goleb</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>plh</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>syoichi</cc>
    
    <cc>travil</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72098</commentid>
    <comment_count>0</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-08-13 06:03:24 +0000</bug_when>
    <thetext>http://dev.w3.org/html5/spec/webappapis.html#event-handler-attributes

mousewheel event isn&apos;t a standard event. Instead of it, D3E spec defined wheel event which is really different from mousewheel event.
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-wheel

Therefore, I think that only onwheel attribute should be defined by HTML5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72104</commentid>
    <comment_count>1</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2012-08-13 07:29:49 +0000</bug_when>
    <thetext>If onmousewheel is used in the wild, bikeshedding the name isn&apos;t worth the trouble. Is it used in the wild?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72105</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2012-08-13 08:16:53 +0000</bug_when>
    <thetext>http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1696

This test shows that Opera and Chrome support only the mousewheel event, not the mouse event. Firefox seems to support neither and I&apos;m not able to test in IE, but juding by http://www.quirksmode.org/dom/events/scroll.html it is supported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72106</commentid>
    <comment_count>3</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-08-13 08:27:01 +0000</bug_when>
    <thetext>FYI: Firefox has supported D3E wheel event since yesterday, but still not support mousewheel event because it&apos;s not in any standard spec.
https://bugzilla.mozilla.org/show_bug.cgi?id=719320</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72163</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-08-14 15:19:38 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; If onmousewheel is used in the wild, bikeshedding the name isn&apos;t worth the
&gt; trouble. Is it used in the wild?

Yes.

$ grep -aPic &quot;\sonmousewheel\s*=&quot; web200904 
1434</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73587</commentid>
    <comment_count>5</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-09-11 13:39:42 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Rationale: I concur with Henri, this is used in the wild.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73669</commentid>
    <comment_count>6</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-09-12 03:54:41 +0000</bug_when>
    <thetext>I don&apos;t think that onmousewheel is used for D3E WheelEvent. It&apos;s used for the legacy mousewheel event on IE, Opera and WebKit browsers. Only IE9 and Fx17 implemented the D3E WheelEvent. Therefore, I don&apos;t think the change breaks existing web pages. &quot;onmousewheel&quot; should be available for the legacy (unstandardized) event handler actually, but I think that HTML5 spec shouldn&apos;t define such event handler attribute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73670</commentid>
    <comment_count>7</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-09-12 04:06:15 +0000</bug_when>
    <thetext>FYI:

mousewheel event:
https://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference/mousewheel

MouseWheelEvent object:
https://developer.mozilla.org/en-US/docs/DOM/MouseWheelEvent

So, it&apos;s really different event from D3E wheel event (WheelEvent object).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73769</commentid>
    <comment_count>8</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-09-13 14:26:23 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; I don&apos;t think that onmousewheel is used for D3E WheelEvent. It&apos;s used for the
&gt; legacy mousewheel event on IE, Opera and WebKit browsers. Only IE9 and Fx17
&gt; implemented the D3E WheelEvent. Therefore, I don&apos;t think the change breaks
&gt; existing web pages. &quot;onmousewheel&quot; should be available for the legacy
&gt; (unstandardized) event handler actually, but I think that HTML5 spec shouldn&apos;t
&gt; define such event handler attribute.

Sorry but I&apos;m not entirely certain that I understand what changes you would like to see. Here is what I understand, please tell me if I get it right.

You would like the HTML spec to drop onmousewheel. Reason: At least Firefox doesn&apos;t support it and doesn&apos;t plan to (according to https://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference/mousewheel). If that&apos;s indeed the case, it seems like a good reason to drop it (requires confirmation though).

Furthermore, you are asking that HTML define the &quot;onwheel&quot; attribute. Am I correctly guessing that by that you mean just the on* attribute but for what it actually does refer to D3E?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73822</commentid>
    <comment_count>9</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-09-14 01:15:51 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; You would like the HTML spec to drop onmousewheel. Reason: At least Firefox
&gt; doesn&apos;t support it and doesn&apos;t plan to (according to
&gt; https://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference/mousewheel).
&gt; If that&apos;s indeed the case, it seems like a good reason to drop it (requires
&gt; confirmation though).

Yes, but the reason isn&apos;t the firefox&apos;s plan. The mousehweel event has never defined yet. That&apos;s the reason why firefox doesn&apos;t have plan to implement it (Actually, the behavior of IE, WebKit and Opera isn&apos;t same even on Windows though). I think that HTML5 spec shouldn&apos;t define on* attributes whose event isn&apos;t defined in any standard spec.

&gt; Furthermore, you are asking that HTML define the &quot;onwheel&quot; attribute.

Yes.

&gt; Am I
&gt; correctly guessing that by that you mean just the on* attribute but for what it
&gt; actually does refer to D3E?

Sorry, I&apos;m not sure what you ask me here. I just reported only for &quot;onwheel&quot;. But it may be better if HTML5 defines on* attributes for all D3E events (e.g., &quot;focusin&quot;, &quot;focusout&quot;, &quot;mouseenter&quot;, &quot;mouseleave&quot;, &quot;compositionstart&quot;, &quot;compositionupdate&quot;, &quot;compositionend&quot;, but I&apos;m not sure for deprecated DOM* events in D3E).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73996</commentid>
    <comment_count>10</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2012-09-17 12:07:53 +0000</bug_when>
    <thetext>Shouldn&apos;t it be considered a defect of DOM3 Events if it reinvents the wheel and mints a new event name instead of standardizing what most browsers implement?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74018</commentid>
    <comment_count>11</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-09-18 03:51:00 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; Shouldn&apos;t it be considered a defect of DOM3 Events if it reinvents the wheel
&gt; and mints a new event name instead of standardizing what most browsers
&gt; implement?

I don&apos;t think so. The mousewheel event isn&apos;t useful for web developers since the delta values don&apos;t indicate preferred scroll amount. On the other hand, legacy mouse wheel events on Gecko indicate the scroll amount but the behavior is too complicated.

The new D3E wheel event indicates the scroll amount and behaves simply. So, I believe that the D3E wheel event improves everything for mouse wheel event handling on web applications.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91063</commentid>
    <comment_count>12</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-07-22 08:40:40 +0000</bug_when>
    <thetext>I sorted out and documented the legacy mousewheel event&apos;s delta value between IE, Opera(Presto), Chrome and Safari. See the chaos of this event. HTML5 shouldn&apos;t refer this event. Instead of that, referring D3E wheel event is good solution.

https://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference/mousewheel#wheelDelta.2C_wheelDeltaX_and_wheelDeltaY_value

So, I strongly recommend that HTML5 spec should drop onmousewheel attribute and add onwheel attribute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92326</commentid>
    <comment_count>13</comment_count>
    <who name="Michał Z. Gołębiowski">m.goleb</who>
    <bug_when>2013-08-20 13:00:40 +0000</bug_when>
    <thetext>This is a huge problem. IE9+ implements the `wheel` event but not the `onwheel` attrubute. This makes it impossible for web developers to feature detect the event presence and forcing them to create ugly UA-sniffs, see:
https://github.com/mzgol/wheel/blob/master/jquery.wheel.js#L17-19
and:
https://github.com/brandonaaron/jquery-mousewheel/blob/master/jquery.mousewheel.js#L27

I reported the issue to the IE team:
http://connect.microsoft.com/IE/feedback/details/782835
but they advised to use the flawed `hasFeature` method that isn&apos;t even supported any more by Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=801425
This is because feature detection methods based on &quot;I&apos;ll tell you if I think I support a particular spec&quot; doesn&apos;t work.

Checking for the `on`+event attributes is the most reliable way of feature detecting support for it. If it was specified, I&apos;d have it easier to press IE team to implement it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92327</commentid>
    <comment_count>14</comment_count>
    <who name="Michał Z. Gołębiowski">m.goleb</who>
    <bug_when>2013-08-20 13:02:12 +0000</bug_when>
    <thetext>WebKit now also always returns true for hasFeature:
http://trac.webkit.org/changeset/153901</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92349</commentid>
    <comment_count>15</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2013-08-20 16:48:50 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; Checking for the `on`+event attributes is the most reliable way of feature
&gt; detecting support for it. If it was specified, I&apos;d have it easier to press
&gt; IE team to implement it.

No need to press, it&apos;s on our radar--just didn&apos;t land in time for IE11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92350</commentid>
    <comment_count>16</comment_count>
    <who name="Michał Z. Gołębiowski">m.goleb</who>
    <bug_when>2013-08-20 17:00:41 +0000</bug_when>
    <thetext>(In reply to comment #15)
&gt; (In reply to comment #13)
&gt; &gt; Checking for the `on`+event attributes is the most reliable way of feature
&gt; &gt; detecting support for it. If it was specified, I&apos;d have it easier to press
&gt; &gt; IE team to implement it.
&gt; 
&gt; No need to press, it&apos;s on our radar--just didn&apos;t land in time for IE11.

Good to know, when I reported the issue:
http://connect.microsoft.com/IE/feedback/details/782835/
I got a negative answer: that I can use `hasFeature` (which is broken by design).

Too bad you don&apos;t plan to make it for IE11, in my `wheel` jQuery plugin I&apos;m first checking for `onwheel` and when missing, I&apos;m doing an ugly UA-sniff by checking `navigator.appName`. The code will now break in IE11 since it changed the `appName` value without matching behavior of other browsers with respect to `onwheel`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92351</commentid>
    <comment_count>17</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-08-20 17:04:14 +0000</bug_when>
    <thetext>Although the reason why web developers want onwheel attribute for the feature detection is, WebKit and Blink returns non-null for window.WheelEvent even they don&apos;t support D3E WheelEvent...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121042</commentid>
    <comment_count>18</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2015-06-16 10:18:32 +0000</bug_when>
    <thetext>Making this a higher priority to actively seek more feedback on from implementers and webdevs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121065</commentid>
    <comment_count>19</comment_count>
    <who name="Michał Z. Gołębiowski">m.goleb</who>
    <bug_when>2015-06-16 11:11:56 +0000</bug_when>
    <thetext>Microsoft Edge now supports the `onwheel` attribute as opposed to IE11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121879</commentid>
    <comment_count>20</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2015-07-08 15:18:30 +0000</bug_when>
    <thetext>Firefox dropped mousewheel
 https://developer.mozilla.org/en-US/docs/Web/API/MouseWheelEvent
Ditto for Edge.
Chrome supports both.

So it&apos;s time to drop mousewheel imho.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121881</commentid>
    <comment_count>21</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2015-07-08 17:32:39 +0000</bug_when>
    <thetext>https://github.com/w3c/spork/pull/13</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121883</commentid>
    <comment_count>22</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2015-07-08 17:53:48 +0000</bug_when>
    <thetext>(In reply to Philippe Le Hegaret from comment #21)
&gt; https://github.com/w3c/spork/pull/13

Note that Chrome and Edge both added some of the mousewheel&apos;s properties onto the Wheel event interface for compat...

    [Constructor(DOMString typeArg, optional WheelEventInit eventInitDict)]
    interface WheelEvent : MouseEvent
    {
        // DeltaModeCode
        const unsigned long DOM_DELTA_PIXEL = 0x00;
        const unsigned long DOM_DELTA_LINE = 0x01;
        const unsigned long DOM_DELTA_PAGE = 0x02;

        // From Legacy MouseWheel...
        readonly attribute long wheelDelta;
        readonly attribute long wheelDeltaX;
        readonly attribute long wheelDeltaY;

        readonly attribute long deltaX;
        readonly attribute long deltaY;
        readonly attribute long deltaZ;
        readonly attribute unsigned long deltaMode;

    };</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121908</commentid>
    <comment_count>23</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2015-07-09 12:10:34 +0000</bug_when>
    <thetext>Re #22 That&apos;s something for UI Events to resolve. Do you have a bug for that in UI Events or should I add one? In the meantime, this HTML bug can be closed. PR#13 has been merged.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>