Menu

#1621 2.15 regression: wrong <input> ownerForm when <form> between <table><tr>

2.15
closed
RBRi
None
1
2014-08-03
2014-07-01
No

This is a regression since version 2.15.

Summary: <inputs> attaches to the wrong owner <form> when <form> is between <table><tr>

html:

<html>
<body>
<table>
<form name="f1">
<tr>
    <td>
        <input name="f1_submit" type="submit"/>
    </td>
</tr>
</form>
<form name="f2">
</form>
</table>
</body>
</html>

Test code:

HtmlPage page = new WebClient(BrowserVersion.CHROME).getPage(TEST_URL);
HtmlInput input = page.getFirstByXPath("//input[@name='f1_submit']");
String formName = input.getEnclosingForm().getNameAttribute();
  • Expected: formName = "f1"
  • Actual: formName = "f2"

Related

Bugs: #1630

Discussion

  • RBRi

    RBRi - 2014-08-02

    This is already fixed. Please update to the latest snapshot build and report back (http://build.canoo.com/htmlunit/artifacts/).

     
  • RBRi

    RBRi - 2014-08-02
    • status: open --> pending
    • assigned_to: RBRi
     
  • Atsushi Nakagawa

    I've checked and can confirm that the current 2.16 snapshot fixes this issue.

     

    Last edit: Atsushi Nakagawa 2014-08-03
  • RBRi

    RBRi - 2014-08-03
    • status: pending --> closed
     
  • RBRi

    RBRi - 2014-08-03

    Thanks for reporting back.

     

Log in to post a comment.