<?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>12133</bug_id>
          
          <creation_ts>2007-01-05 14:22:14 -0800</creation_ts>
          <short_desc>Form buttons don&apos;t receive click events if the mouse is dragged before releasing</short_desc>
          <delta_ts>2007-01-26 09:39:24 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>420+</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://google.com</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dex Deacon">occupant4</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36823</commentid>
    <comment_count>0</comment_count>
    <who name="Dex Deacon">occupant4</who>
    <bug_when>2007-01-05 14:22:14 -0800</bug_when>
    <thetext>(Windows only, probably because Mac uses native widgets)

1. Visit any page with a form submission button (such as google.com).
2. Press the left mouse button on the form button, but don&apos;t release.
3. Move the mouse a small amount, keeping the cursor within the button.
4. Release the button.

If the mouse moved at all before you release, the form button will not be clicked.

This happens because invalidateClick() is called in EventHandler::handleMouseMoveEvent(), which resets the click count and prevents further mouse-up events from dispatching a click.  I don&apos;t think simply removing that call is the right move, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36810</commentid>
    <comment_count>1</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2007-01-05 14:25:35 -0800</bug_when>
    <thetext>ToT Mac does not use native widgets.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36782</commentid>
    <comment_count>2</comment_count>
      <attachid>12250</attachid>
    <who name="Dex Deacon">occupant4</who>
    <bug_when>2007-01-05 15:53:11 -0800</bug_when>
    <thetext>Created attachment 12250
simple fix

The click should only be invalidated if the move starts a selection - otherwise, it makes more sense to allow mouse movements during clicks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36731</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-01-06 02:33:21 -0800</bug_when>
    <thetext>It would be good to know why this doesn&apos;t happen on Mac.

See also: bug 8150.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36616</commentid>
    <comment_count>4</comment_count>
      <attachid>12250</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-01-06 16:57:20 -0800</bug_when>
    <thetext>Comment on attachment 12250
simple fix

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36270</commentid>
    <comment_count>5</comment_count>
    <who name="Dex Deacon">occupant4</who>
    <bug_when>2007-01-08 13:41:35 -0800</bug_when>
    <thetext>Oops - this bug is a dupe of http://bugs.webkit.org/show_bug.cgi?id=8150 .

My &quot;simple fix&quot; patch fixes the first two cases in that bug&apos;s attached test case (http://bugs.webkit.org/attachment.cgi?id=7480).  The third case still results in no click if the mouse is moved.

If you test the third case in Firefox, you&apos;ll see that a click is registered if and only if nothing is selected as a result of a drag - as soon as text is selected, the click is invalidated.  In IE7, the click is never invalidated - as long as the mouseup is in the same element as the mousedown, it&apos;s a click.  Not sure which behavior we&apos;d prefer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36273</commentid>
    <comment_count>6</comment_count>
    <who name="Dex Deacon">occupant4</who>
    <bug_when>2007-01-08 13:58:47 -0800</bug_when>
    <thetext>Simply removing the called to invalidateClick() altogether gives us behavior identical to Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34270</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-01-18 17:38:59 -0800</bug_when>
    <thetext>Should this patch be landed as-is, or do you intend to update it so that we match Firefox?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34159</commentid>
    <comment_count>8</comment_count>
      <attachid>12565</attachid>
    <who name="Dex Deacon">occupant4</who>
    <bug_when>2007-01-19 18:07:06 -0800</bug_when>
    <thetext>Created attachment 12565
alternate fix, matches firefox

I would prefer if we matched Firefox&apos;s behavior.  It seems more correct to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34160</commentid>
    <comment_count>9</comment_count>
      <attachid>12565</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-01-19 19:15:12 -0800</bug_when>
    <thetext>Comment on attachment 12565
alternate fix, matches firefox

OK, sounds fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32491</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-01-26 09:39:24 -0800</bug_when>
    <thetext>I&apos;m being sloppy here, not following our usual process and landing this change without an automated test. Next time I really need to do &quot;review-&quot; on a patch that fixes a bug that does not include a regression test for the fix.

Committed revision 19158.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>12250</attachid>
            <date>2007-01-05 15:53:11 -0800</date>
            <delta_ts>2007-01-06 16:57:20 -0800</delta_ts>
            <desc>simple fix</desc>
            <filename>click.patch</filename>
            <type>text/plain</type>
            <size>1381</size>
            <attacher name="Dex Deacon">occupant4</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09P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IHNlbGVjdGlv
biBpcyBjb250YWluZWQgaW4gYSBsYXllciB0aGF0IGNhbiBzY3JvbGwsIHRoYXQgbGF5ZXIgc2hv
dWxkIGhhbmRsZSB0aGUgYXV0b3Njcm9sbApAQCAtMzIyLDYgKzMyMSw4IEBAIGJvb2wgRXZlbnRI
YW5kbGVyOjpoYW5kbGVNb3VzZU1vdmVFdmVudCgKICAgICBpZiAoIShtX21vdXNlRG93bk1heVN0
YXJ0U2VsZWN0ICYmIGlubmVyTm9kZS0+cmVuZGVyZXIoKS0+c2hvdWxkU2VsZWN0KCkpKQogICAg
ICAgICByZXR1cm4gZmFsc2U7CiAKKyAgICBpbnZhbGlkYXRlQ2xpY2soKTsKKwogICAgIC8vIGhh
bmRsZSBtYWtpbmcgc2VsZWN0aW9uCiAgICAgSW50UG9pbnQgdlBvaW50ID0gbV9mcmFtZS0+dmll
dygpLT53aW5kb3dUb0NvbnRlbnRzKGV2ZW50LmV2ZW50KCkucG9zKCkpOyAgICAgICAgCiAgICAg
VmlzaWJsZVBvc2l0aW9uIHBvcyhpbm5lck5vZGUtPnJlbmRlcmVyKCktPnBvc2l0aW9uRm9yUG9p
bnQodlBvaW50KSk7Cg==
</data>
<flag name="review"
          id="4555"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>12565</attachid>
            <date>2007-01-19 18:07:06 -0800</date>
            <delta_ts>2007-01-19 19:15:12 -0800</delta_ts>
            <desc>alternate fix, matches firefox</desc>
            <filename>click-2.patch</filename>
            <type>text/plain</type>
            <size>1017</size>
            <attacher name="Dex Deacon">occupant4</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAxODkxNC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EgbGF5ZXIgdGhhdCBjYW4g
c2Nyb2xsLCB0aGF0IGxheWVyIHNob3VsZCBoYW5kbGUgdGhlIGF1dG9zY3JvbGwK
</data>
<flag name="review"
          id="4764"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>