mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibWeb: Don't proceed with Element.click() on disabled form controls
Fixes an infinite reload loop on some of the dom/events/ tests in WPT.
This commit is contained in:
parent
696ccc1aa9
commit
273593afba
Notes:
github-actions[bot]
2024-07-26 12:25:59 +00:00
Author: https://github.com/awesomekling
Commit: 273593afba
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/841
Reviewed-by: https://github.com/tcl3
3 changed files with 18 additions and 1 deletions
|
@ -0,0 +1,12 @@
|
|||
<form id="theForm" style="display:none"><button id="theButton" type="submit" disabled></button></form>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
theForm.onclick = function() {
|
||||
println("FAIL! Should not click!");
|
||||
}
|
||||
|
||||
test(() => {
|
||||
theButton.click();
|
||||
println("PASS! Did not click");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue