Open ThomasMeschke opened 4 months ago
Any information, notice, update on this one?
@ThomasMeschke I'm not sure with the information given why this wouldn't behave the same as manually double clicking. We'll need more information to reproduce the situation to investigate the cause. Can you provide a way to reproduce?
Well, here we go...
To reproduce this issue, you are going to need some setup allowing you to run a PHP backend to have some sort of round-trip.
To not clutter the ticket, I published the backend PHP here: https://onlinephp.io/c/9c7b12db-e612-4a08-82df-070f64f1f712 Abstract:
When the form is submitted via double click manually, the output reads "FooFoo", since the form gets submitted twice and thus the second "Foo" gets appended to the file, before it gets deleted in the first call's processing.
You can see me using this manually here:
As you can see, one click leads to Foo while a double click leads to FooFoo. Note: when reproducing this I notice that Firefox already seem to prevent the double click submission of forms, since I could not get it to invoke the backend twice. But Chrome and Edge do, and since the have the bigger market share over Firefox, I'm focusing on them.
To reproduce the issue, I wrote a matching cypress spec you can find here: https://jsfiddle.net/0ryn4uo6/ Abstract:
You can see the spec fail here:
This also goes to show that really only one request is submitted when you open up the developer tools inside cypress...
... while Chrome itself triggers two requests:
If any further information is needed, let me know.
@ThomasMeschke Thank you!
Current behavior
I have an application that generates new DB elements and ensures that the "main name" is unique and no two elements can have the same name. When submitting the form via a manual double click, I can see two POST requests being sent, the validation fires and rejects the second POST with an error stating that this name already exists. When I try to reproduce this using cypress
cy.get(the submit button).dblclick
, only one request is being sent, therefore not reproducing the intended behavior.Desired behavior
As already mentioned in #3224 this should behave the same as manually double-clicking.
Test code to reproduce
Will not help that much, but this is how it is built:
Cypress Version
13.8.1
Node version
20.12.1
Operating System
Windows 10.0.19045
Debug Logs
Other
No response