mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-21 19:30:27 +00:00
Other browsers such as Chrome and Firefox retain the text's color when the text is part of a selection, so let's mimic them.
11 lines
525 B
HTML
11 lines
525 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../expected/selection-start-in-end-node-ref.html" />
|
|
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-268">
|
|
<!-- here the end node contains the start node, as well as some further selected content and some non-selected content. -->
|
|
<span id="end">End Node <span id="start">Start</span> <span>Node</span> </span>NOT SELECTED
|
|
<script>
|
|
let range = document.createRange();
|
|
range.setStart(start, 0);
|
|
range.setEnd(end, 4);
|
|
window.getSelection().addRange(range);
|
|
</script>
|