Files
ladybird/Tests/LibWeb/Text/input/click-behind-user-select-none-fragment.html
Psychpsyo 30c1f2f938 LibWeb: Do not re-target hits to fragments with user-select:none
This makes text selection more usable around them, as demonstrated in
the added test case.
2026-02-16 08:39:28 +01:00

15 lines
492 B
HTML

<!DOCTYPE html>
<script src="include.js"></script>
<div style="font-size:20px">That span has <span style="user-select:none">user-select: none</span></div>
<script>
test(() => {
// Select text by double-clicking
internals.click(20, 20, 2);
println(`"${window.getSelection()}"`);
// Now try deselecting on mousedown behind the user-select:none element.
internals.mouseDown(100, 100);
println(`"${window.getSelection()}"`);
});
</script>