mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-12 12:01:52 +00:00
Previously, if the user made a find-in-page query, then cleared the selection made by that query, subsequent queries would inadvertently advance to the next match instead of reselecting the first match.
12 lines
398 B
HTML
12 lines
398 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<div>test</div>
|
|
<script>
|
|
test(() => {
|
|
let result = window.find("test");
|
|
println(`window.find("test") initial result: ${result}`);
|
|
window.getSelection().removeAllRanges();
|
|
result = window.find("test");
|
|
println(`window.find("test") after clearing the previous selection: ${result}`);
|
|
});
|
|
</script>
|