mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
This makes text selection more usable around them, as demonstrated in the added test case.
15 lines
492 B
HTML
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>
|