LibWeb: Do not clear the selection, when query is not found

Fixes #4743
This commit is contained in:
Chris Mulder 2025-05-15 22:08:03 +02:00 committed by Jelle Raaijmakers
commit 09463f147d
Notes: github-actions[bot] 2025-05-26 09:24:03 +00:00
3 changed files with 8 additions and 2 deletions

View file

@ -16,6 +16,11 @@ test(() => {
document.querySelector('div').childNodes[0].deleteData(3, 3);
showSelection();
// Try to find 'baz'.
window.find('baz');
// Selection should be untouched, since 'baz' was not found
showSelection();
// Try to find 'bar'.
getSelection().empty();
window.find('bar');