Skip to content

Commit

Permalink
[Live Range Selection] fast/events/no-scroll-on-input-text-selection.…
Browse files Browse the repository at this point in the history
…html fails

https://bugs.webkit.org/show_bug.cgi?id=248423

Reviewed by Darin Adler.

Check input.selectionEnd > input.selectionStart instead of checking
getSelection().toString().length > 0 since enabling live range selection will
make getSelection().toString() to no longer return the string inside the input.

* LayoutTests/fast/events/no-scroll-on-input-text-selection-expected.txt:
* LayoutTests/fast/events/no-scroll-on-input-text-selection.html:

Canonical link: https://commits.webkit.org/257126@main
  • Loading branch information
rniwa committed Nov 29, 2022
1 parent a98a915 commit 8aeaa9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -3,7 +3,7 @@ Verify selecting text does not cause any scrolling.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS document.getSelection().toString().length > 1 is true
PASS ta.selectionStart < ta.selectionEnd is true
PASS pageXOffset is 0
PASS pageYOffset is originalPageYOffset
PASS document.scrollingElement.scrollLeft is 0
Expand Down
Expand Up @@ -37,7 +37,7 @@
if (window.eventSender)
eventSender.mouseUp();

shouldBeTrue('document.getSelection().toString().length > 1');
shouldBeTrue('ta.selectionStart < ta.selectionEnd');
shouldBe('pageXOffset', '0');
shouldBe('pageYOffset', 'originalPageYOffset');
shouldBe('document.scrollingElement.scrollLeft', '0');
Expand Down

0 comments on commit 8aeaa9c

Please sign in to comment.