<?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>17626</bug_id>
          
          <creation_ts>2012-06-28 09:56:40 +0000</creation_ts>
          <short_desc>mousemove event is really cancelable?</short_desc>
          <delta_ts>2012-09-13 01:22:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - DOM3 Events</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>needsReview</keywords>
          <priority>P2</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>bugs</cc>
    
    <cc>glenn</cc>
    
    <cc>mike</cc>
    
    <cc>ojan</cc>
    
    <cc>travil</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>69480</commentid>
    <comment_count>0</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-06-28 09:56:40 +0000</bug_when>
    <thetext>I&apos;d like to confirm that is intentional change or a bug of the draft.

In DOM2, mousemove event isn&apos;t cancelable, but the D3E spec draft defines it&apos;s cancelable.

If that is intentional change, we will change the behavior on Gecko.
https://bugzilla.mozilla.org/show_bug.cgi?id=704423

See https://bugzilla.mozilla.org/show_bug.cgi?id=704423#c1 for the compatibility with browsers.

I think that it should be cancelable. See http://lists.w3.org/Archives/Public/www-dom/2011OctDec/0253.html for the reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69493</commentid>
    <comment_count>1</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2012-06-28 15:29:30 +0000</bug_when>
    <thetext>In the mozilla bug, you listed that Opera and IE9 allow you to cancel this event, but still update hover-state. What effect does canceling the events have that is user/developer visible?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69495</commentid>
    <comment_count>2</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-06-28 16:04:36 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; In the mozilla bug, you listed that Opera and IE9 allow you to cancel this
&gt; event, but still update hover-state. What effect does canceling the events have
&gt; that is user/developer visible?

I tested by the defaultPrevented attribute.

Additionally, IE9 doesn&apos;t change selected item by mousemove event after mousedown in listbox styled &lt;select&gt; element if mousemove element is consumed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69496</commentid>
    <comment_count>3</comment_count>
      <attachid>1147</attachid>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-06-28 16:11:35 +0000</bug_when>
    <thetext>Created attachment 1147
testcase for the default action if preventDefault() is called</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69497</commentid>
    <comment_count>4</comment_count>
      <attachid>1148</attachid>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-06-28 16:14:08 +0000</bug_when>
    <thetext>Created attachment 1148
testcase for checking defaultPrevented attribute value of mousemove event</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69499</commentid>
    <comment_count>5</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2012-06-28 17:30:08 +0000</bug_when>
    <thetext>I don&apos;t see a point in making it cancellable if cancelling it doesn&apos;t do anything. Maybe someone from IE/Opera could comment on whether it accomplishes anything else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69972</commentid>
    <comment_count>6</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-07-13 21:53:26 +0000</bug_when>
    <thetext>Historically the spec had mousemove as not cancelable, but sometime between 2002 (http://www.w3.org/TR/2002/WD-DOM-Level-3-Events-20020712/) and 2003 (http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030221/events.html#Events-EventTypes-complete) this was switched to cancelable and has apparently been that way ever since.

The term &quot;mousemove&quot; doesn&apos;t come up anywhere in the www-dom archives during that period either. So, the trail has gone cold trying to understand why the spec changed back then.

In checking IE&apos;s behavior, we explicitly ignore the canceled state for hover, as has been observed. It does not appear to have other impact that we could readily see, though we didn&apos;t follow all code paths.

I see the point of making every event that can be cancelable have some rational behavior when it is canceled, but then again, the spec already points out that this logic may not always hold true:
file:///D:/DOM3Events/D3E/html/DOM3-Events.html#event-flow-default-cancel

At this point, I&apos;d rather not tweak the value in the spec unless there&apos;s a more substantive reason to change it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73671</commentid>
    <comment_count>7</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-09-12 04:15:37 +0000</bug_when>
    <thetext>Excuse me, I don&apos;t understand what &quot;WONTFIX&quot; means for this bug.

So, starting D3E, should the mousemove event be cancelable? I mean, should defaultPrevented be able to become true if preventDefault() is called?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73699</commentid>
    <comment_count>8</comment_count>
    <who name="Glenn Maynard">glenn</who>
    <bug_when>2012-09-12 15:21:31 +0000</bug_when>
    <thetext>Note that an event being cancellable is mostly legacy; I&apos;m not aware of any real purpose to this flag today.  It dates from when the &quot;default behavior&quot; of an event was thought of as a part of event dispatch, but with a couple isolated exceptions (onclick) that&apos;s no longer the case; the whole concept of default behavior is a misnomer.  It&apos;s saner to err towards cancellable, for simplicity, to always make newly-minted events cancellable, and to only maintain existing events as not cancellable for compatibility.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73708</commentid>
    <comment_count>9</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-09-12 18:00:36 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; I&apos;d like to confirm that is intentional change or a bug of the draft.
&gt; 
&gt; In DOM2, mousemove event isn&apos;t cancelable, but the D3E spec draft defines it&apos;s
&gt; cancelable.
&gt; 
&gt; If that is intentional change, we will change the behavior on Gecko.
&gt; https://bugzilla.mozilla.org/show_bug.cgi?id=704423
&gt; 
&gt; See https://bugzilla.mozilla.org/show_bug.cgi?id=704423#c1 for the
&gt; compatibility with browsers.
&gt; 
&gt; I think that it should be cancelable. See
&gt; http://lists.w3.org/Archives/Public/www-dom/2011OctDec/0253.html for the
&gt; reason.

(In reply to comment #7)
&gt; Excuse me, I don&apos;t understand what &quot;WONTFIX&quot; means for this bug.
&gt; 
&gt; So, starting D3E, should the mousemove event be cancelable? I mean, should
&gt; defaultPrevented be able to become true if preventDefault() is called?

To be clear--yes, mousemove should be cancelable and defaultPrevented should become true when preventDefault() is called on this event.

There is no other tangible side-effect to cancelling this event that implementers must support.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73736</commentid>
    <comment_count>10</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-09-13 01:22:51 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; To be clear--yes, mousemove should be cancelable and defaultPrevented should
&gt; become true when preventDefault() is called on this event.
&gt; 
&gt; There is no other tangible side-effect to cancelling this event that
&gt; implementers must support.

Thanks, it&apos;s very clear for me!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1147</attachid>
            <date>2012-06-28 16:11:35 +0000</date>
            <delta_ts>2012-06-28 16:11:35 +0000</delta_ts>
            <desc>testcase for the default action if preventDefault() is called</desc>
            <filename>doPreventDefault.html</filename>
            <type>text/html</type>
            <size>2866</size>
            <attacher name="Masayuki Nakano">masayuki</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxkaXY+CjxsYWJlbD5zZWxlY3QgZm9sbG93aW5nIGV2ZW50IG5hbWVz
IHdoaWNoIHlvdSB3YW50IHRvIGNhbGwgPGNvZGU+cHJldmVudERlZmF1bHQoKTwvY29kZT4gb2Yu
PGJyPgo8c2VsZWN0IG11bHRpcGxlIGlkPSJwcmV2ZW50RGVmYXVsdExpc3QiIHNpemU9IjgiIG9u
Y2hhbmdlPSJkb1ByZXZlbnREZWZhdWx0KCk7Ij4KICA8b3B0aW9uPmtleWRvd248L29wdGlvbj4K
ICA8b3B0aW9uPmtleXByZXNzPC9vcHRpb24+CiAgPG9wdGlvbj5rZXl1cDwvb3B0aW9uPgogIDxv
cHRpb24+bW91c2Vkb3duPC9vcHRpb24+CiAgPG9wdGlvbj5tb3VzZW1vdmU8L29wdGlvbj4KICA8
b3B0aW9uPm1vdXNldXA8L29wdGlvbj4KICA8b3B0aW9uPmNsaWNrPC9vcHRpb24+CiAgPG9wdGlv
bj5kYmxjbGljazwvb3B0aW9uPgo8L3NlbGVjdD48L2xhYmVsPgo8ZGl2IGlkPSJkb1ByZXZlbnRE
ZWZhdWx0Ij4KPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPgpmdW5jdGlvbiBwcmV2ZW50
aW5nRGVmYXVsdEhhbmRsZXIoZSkKewogIGUucHJldmVudERlZmF1bHQoKTsKfQoKZnVuY3Rpb24g
ZG9QcmV2ZW50RGVmYXVsdCgpCnsKICB2YXIgbGlzdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlk
KCJwcmV2ZW50RGVmYXVsdExpc3QiKTsKICB2YXIgZGl2ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5
SWQoImRvUHJldmVudERlZmF1bHQiKTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGxpc3Qub3B0aW9u
cy5sZW5ndGg7IGkrKykgewogICAgd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PjwvbGk+Cjxs
aT48bGFiZWw+Y29sb3I6IDxpbnB1dCB0eXBlPSJjb2xvciIvPjwvbGFiZWw+PC9saT4KPGxpPjxs
YWJlbD50ZXh0YXJlYTogPHRleHRhcmVhPjwvdGV4dGFyZWE+PC9sYWJlbD48L2xpPgo8bGk+PGxh
YmVsPmNvbWJvYm94OiA8c2VsZWN0PjxvcHRpb24+Zmlyc3QgaXRlbTwvb3B0aW9uPjxvcHRpb24+
c2Vjb25kIGl0ZW08L29wdGlvbj48L3NlbGVjdD48L2xhYmVsPjwvbGk+CjxsaT48bGFiZWw+bGlz
dGJveDogPHNlbGVjdCBzaXplPSI0Ij48b3B0aW9uPmZpcnN0IGl0ZW08L29wdGlvbj48b3B0aW9u
PnNlY29uZCBpdGVtPC9vcHRpb24+PG9wdGlvbj50aGlyZCBpdGVtPC9vcHRpb24+PC9zZWxlY3Q+
PC9sYWJlbD48L2xpPgo8bGk+PGxhYmVsPmxpc3Rib3g6IDxzZWxlY3QgbXVsdGlwbGU9Im11bHRp
cGxlIj48b3B0aW9uPmZpcnN0IGl0ZW08L29wdGlvbj48b3B0aW9uPnNlY29uZCBpdGVtPC9vcHRp
b24+PG9wdGlvbj50aGlyZCBpdGVtPC9vcHRpb24+PC9zZWxlY3Q+PC9sYWJlbD48L2xpPgo8L3Vs
Pgo8L2Rpdj4KPC9kaXY+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1148</attachid>
            <date>2012-06-28 16:14:08 +0000</date>
            <delta_ts>2012-06-28 16:14:08 +0000</delta_ts>
            <desc>testcase for checking defaultPrevented attribute value of mousemove event</desc>
            <filename>mousemove.html</filename>
            <type>text/html</type>
            <size>495</size>
            <attacher name="Masayuki Nakano">masayuki</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxwPkhlcmUgaXMgdGV4dDwvcD4KPHAgaWQ9InN0YXR1cyI+PC9wPgo8
c2NyaXB0PgogIHZhciB0aW1lciA9IDA7CiAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoIm1vdXNl
bW92ZSIsCiAgICBmdW5jdGlvbiAoZSkgewogICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAg
IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJzdGF0dXMiKS5pbm5lckhUTUwgPQogICAgICAgIGUu
ZGVmYXVsdFByZXZlbnRlZCA/ICJzdWNjZWVkZWQgdG8gcHJldmVudERlZmF1bHQoKSIgOgogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICJmYWlsZWQgdG8gcHJldmVudGVkRGVmYWx1bHQoKSI7
CiAgICAgIGNsZWFyVGltZW91dCh0aW1lcik7CiAgICAgIHRpbWVyID0gc2V0VGltZW91dChmdW5j
dGlvbiAoKSB7CiAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInN0YXR1cyIpLmlubmVy
SFRNTCA9ICIiOyB9LCA1MDApOyB9LCB0cnVlKTsKPC9zY3JpcHQ+
</data>

          </attachment>
      

    </bug>

</bugzilla>