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!
Thanks Ahmad. That seems a low hanging fruit. Maybe there should be an additional WPT test for this.
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.
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.