mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 02:42:10 +00:00
LibWeb: Do not assume the shadow root has a host when updating selection
For example, if the shadow root was detached from the document in some manner, its host will be null.
This commit is contained in:
parent
59fe7ca830
commit
8fb2cc2be1
Notes:
github-actions[bot]
2024-08-31 13:52:07 +00:00
Author: https://github.com/trflynn89
Commit: 8fb2cc2be1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1205
3 changed files with 25 additions and 5 deletions
|
@ -0,0 +1,17 @@
|
|||
<input type="text" id="input" value="12389" />
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let input = document.getElementById("input");
|
||||
|
||||
input.focus();
|
||||
input.select();
|
||||
|
||||
input.type = "number";
|
||||
|
||||
const rect = input.getBoundingClientRect();
|
||||
internals.click(rect.x + rect.width / 2, rect.y + rect.height / 2);
|
||||
|
||||
println("PASS (didn't crash)");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue