WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
261092
Fixed selectionEnd for TextArea with text end in newline
https://bugs.webkit.org/show_bug.cgi?id=261092
Summary
Fixed selectionEnd for TextArea with text end in newline
Ahmad Saleem
Reported
2023-09-03 15:31:04 PDT
Hi Team, While going through Blink's bugs, came across another failing test: Test Case:
https://jsfiddle.net/Loascueh/show
^ Chrome Canary 118 and Firefox Nightly 118 passes this test while WebKit ToT fails this. Blink Commit:
https://chromium.googlesource.com/chromium/src.git/+/a5a503556d3fdec80c655ac0830018e9cca4c091
WebKit Source:
https://searchfox.org/wubkat/source/Source/WebCore/html/HTMLTextFormControlElement.cpp#713
Local build patch: else if (is<HTMLBRElement>(*node) && node != innerText->lastChild()) ^ Passes in WebKit Test Runner: PASS textarea selection index is correct when text ends in newline Just wanted to raise so we can fix it. Thanks!
Attachments
Test Case (outside of JSFiddle)
(1.07 KB, text/html)
2023-09-04 13:10 PDT
,
Ahmad Saleem
no flags
Details
testcase for textarea selection
(726 bytes, text/html)
2023-09-04 17:02 PDT
,
Karl Dubost
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Karl Dubost
Comment 1
2023-09-03 21:39:23 PDT
Thanks Ahmad. That seems a low hanging fruit. Maybe there should be an additional WPT test for this.
Ahmad Saleem
Comment 2
2023-09-04 13:10:17 PDT
Created
attachment 467541
[details]
Test Case (outside of JSFiddle) It passes in Safari 16.6 without this merge as well. So I am going to close this bug and PR as well.
https://github.com/WebKit/WebKit/pull/17391
JSFiddle messed up 'focus' and was showing me as failing but when I ran it locally, it was passing so no need to merge this.
Karl Dubost
Comment 3
2023-09-04 17:02:48 PDT
Created
attachment 467545
[details]
testcase for textarea selection The wrong test seems to have been uploaded. Here a new test showing as Ahmad said that the result is correct and equivalent in the 3 browsers. The failure for the JSFiddle is related to something else.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug