-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
zenstruck/dom
#7Description
Description
Hello,
Just noticed that performing a click on a button linked to a specific form (with the form attribute) does not seem to be supported right now.
In addition, the formaction attribute is also ignored, though I don't think it's widely used so not really a priority.
Reproducer
Running this will submit on /another-action instead of /action
<form id="my-form" action="/action"></form>
<form action="/another-action">
<button type="submit" form="my-form">Click me</button>
</form>$this->browser()
// ...
->click('Click me')
;Suggestion
I'd be happy to help, though I don't know where would the fix be done :
\Zenstruck\Browser\Session\KernelSession::formFor?\Zenstruck\Dom\Node\Form\Element::form?- Directly in the click() method (though that would leave aside the fields ...)
Arkalo2
Metadata
Metadata
Assignees
Labels
No labels