<?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>49424</bug_id>
          
          <creation_ts>2010-11-11 21:22:26 -0800</creation_ts>
          <short_desc>Calling actions twice for &lt;input type=&quot;submit&quot; /&gt; and &lt;button type=&quot;submit&quot; /&gt; in a &lt;form&gt;</short_desc>
          <delta_ts>2011-05-31 21:11:52 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>39021</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Dai Mikurube">dmikurube</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dglazkov</cc>
    
    <cc>dmikurube</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>308362</commentid>
    <comment_count>0</comment_count>
    <who name="Dai Mikurube">dmikurube</who>
    <bug_when>2010-11-11 21:22:26 -0800</bug_when>
    <thetext>How to reproduce:

&lt;form action=&quot;javascript: handler()&quot; method=&quot;get&quot;&gt;
&lt;button id=&quot;pass1&quot; type=&quot;submit&quot; /&gt;
&lt;input id=&quot;pass2&quot; type=&quot;submit&quot; /&gt;
&lt;/form&gt;
&lt;script&gt;
var count = 0;

function handler()
{
    count++;
}

var input = document.getElementById(&apos;pass2&apos;);
input.click();
console.log(count);
&lt;/script&gt;


Expected:
count will be 1 after input.click();

Actual:
count will be 2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>308366</commentid>
    <comment_count>1</comment_count>
    <who name="Dai Mikurube">dmikurube</who>
    <bug_when>2010-11-11 21:49:44 -0800</bug_when>
    <thetext>For more details,

handler() was incorrectly called twice in case of clicking passC2, passD1, passE1, passE3, passF2 and passG3. Otherwise once.

I guess that clicking &lt;input type=&quot;submit&quot;&gt; coexisting with other &lt;button type=&quot;submit&quot;&gt;s causes double calling.

&lt;form action=&quot;javascript: handler()&quot; method=&quot;get&quot;&gt;
&lt;input id=&quot;passA1&quot; type=&quot;submit&quot; /&gt;
&lt;input id=&quot;passA2&quot; type=&quot;submit&quot; /&gt;
&lt;/form&gt;
&lt;form action=&quot;javascript: handler()&quot; method=&quot;get&quot;&gt;
&lt;button id=&quot;passB1&quot; type=&quot;submit&quot; /&gt;
&lt;button id=&quot;passB2&quot; type=&quot;submit&quot; /&gt;
&lt;/form&gt;
&lt;form action=&quot;javascript: handler()&quot; method=&quot;get&quot;&gt;
&lt;button id=&quot;passC1&quot; type=&quot;submit&quot; /&gt;
&lt;input id=&quot;passC2&quot; type=&quot;submit&quot; /&gt;
&lt;/form&gt;
&lt;form action=&quot;javascript: handler()&quot; method=&quot;get&quot;&gt;
&lt;input id=&quot;passD1&quot; type=&quot;submit&quot; /&gt;
&lt;button id=&quot;passD2&quot; type=&quot;submit&quot; /&gt;
&lt;/form&gt;
&lt;form action=&quot;javascript: handler()&quot; method=&quot;get&quot;&gt;
&lt;input id=&quot;passE1&quot; type=&quot;submit&quot; /&gt;
&lt;button id=&quot;passE2&quot; type=&quot;submit&quot; /&gt;
&lt;input id=&quot;passE3&quot; type=&quot;submit&quot; /&gt;
&lt;/form&gt;
&lt;form action=&quot;javascript: handler()&quot; method=&quot;get&quot;&gt;
&lt;button id=&quot;passF1&quot; type=&quot;submit&quot; /&gt;
&lt;input id=&quot;passF2&quot; type=&quot;submit&quot; /&gt;
&lt;button id=&quot;passF3&quot; type=&quot;submit&quot; /&gt;
&lt;/form&gt;
&lt;form action=&quot;javascript: handler()&quot; method=&quot;get&quot;&gt;
&lt;button id=&quot;passG1&quot; type=&quot;submit&quot; /&gt;
&lt;button id=&quot;passG2&quot; type=&quot;submit&quot; /&gt;
&lt;input id=&quot;passG3&quot; type=&quot;submit&quot; /&gt;
&lt;/form&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>308684</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-11-12 12:13:12 -0800</bug_when>
    <thetext>We have many bugs about this, and most or all likely have a single root cause.

See bug 13012, bug 34315, bug 33513, bug 9715. There are probably more, dglazkov may remember those.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>308695</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2010-11-12 12:21:10 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; We have many bugs about this, and most or all likely have a single root cause.
&gt; 
&gt; See bug 13012, bug 34315, bug 33513, bug 9715. There are probably more, dglazkov may remember those.

Yep. See https://bugs.webkit.org/showdependencytree.cgi?id=39021 for a full-on overview of the problem. More importantly, if you wish to contribute cycles into the effort, I&apos;d be more than happy to help with guidance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>309185</commentid>
    <comment_count>4</comment_count>
    <who name="Dai Mikurube">dmikurube</who>
    <bug_when>2010-11-14 21:24:59 -0800</bug_when>
    <thetext>(In reply to comment #3)
Hi Dimitri, Alexey,

Thank you for letting me know. I posted it since I just found the behavior with &lt;input&gt;s and &lt;button&gt;s when working for other bugs.

It looks like having a deep cause... I&apos;ll try it after finishing other bugs which I&apos;m contributing to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>316000</commentid>
    <comment_count>5</comment_count>
    <who name="Dai Mikurube">dmikurube</who>
    <bug_when>2010-12-01 20:07:24 -0800</bug_when>
    <thetext>(In reply to comment #4)
I&apos;ll be starting to work on them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>316685</commentid>
    <comment_count>6</comment_count>
    <who name="Dai Mikurube">dmikurube</who>
    <bug_when>2010-12-02 22:53:50 -0800</bug_when>
    <thetext>(In reply to comment #5)
I found it works correctly on the current version, great! (I still couldn&apos;t find which patch fixed this bug.)


I&apos;ll be starting on the bugs at https://bugs.webkit.org/showdependencytree.cgi?id=39021 .

Dimitri, I&apos;m wondering if you could give me a kind of guidance about &quot;a single root cause&quot; of them...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>