[Webkit-unassigned] [Bug 33513] New: Submit form failed in onsubmit handler!

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 11 21:41:26 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=33513

           Summary: Submit form failed in onsubmit handler!
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
               URL: http://www.sina.com.cn
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: weihong.zeng at hotmail.com


If submitting a form in onsubmit handler, the submitting may be failed!
Bug's source: open www.sina.com.cn, loginin free email.

Test case like this:

<script>
function chkLogin(){

   document.showLogin.submit(); // note
   document.showLogin.password.value = "";

   return false;
}
</script>

<form name="showLogin" method="post" action="test.php" onsubmit="return
chkLogin();" target="_blank"> 
UserName:<input type="text" name="username" value="" /><br>
Password:<input name="password" type="password" /><br>
<input type="submit" value="Login" /><br>
</form>

After chkLogin is executed, the password is empty and HTMLFormElement executes
real submiting action after dispatching sumbit event, so the submitting failed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list