Created attachment 400093 [details] A video demonstrating the bug Overview: In Safari 13.1 on macOS 10.14 and 10.15, setting a TEXTAREA's value through Javascript and deleting lines from the middle to the top with the DELETE/BACKSPACE key doesn't remove empty lines. This doesn't occur on any other browser tested (Chrome, Firefox, Opera, Brave, Edge). Steps to Reproduce: 1. Navigate to the test case at: https://jsfiddle.net/d75xzjg0/3/ 2. Insert the cursor on the empty line between 3 and 4. 3. Type DELETE/BACKSPACE six types to remove the lines for 3, 2, and 1. Actual Result: The text is removed but the empty lines remain. The position of the lines for 4, 5, and 6 do not change. Expected Result: We expect the newly empty lines to be removed with DELETE/BACKSPACE, so the lines for 4, 5, and 6 are pulled up to the top of the TEXTAREA. This is the behavior on other browsers, and the behavior of Safari prior to 13.1. Notes: I've attached a video demonstrating the issue. If the jsFiddle is unavailable, the code to reproduce is: ~~~ <textarea rows="20" cols="50"></textarea> <script type="text/javascript"> var sel = document.querySelector('textarea'); sel.value = "1\n2\n3\n\n4\n5\n6\n"; </script> ~~~ The issue occurs whether the newlines of the inserted text are CRLF or LF. The issue also persists whether or not there is default text in the TEXTAREA.
Created attachment 400094 [details] A GIF version of the test case video
If your first keystroke is ENTER, then DELETE/BACKSPACE works as expected from that point. The bug does not exist in the Safari Technology Preview build.
<rdar://problem/63603840>
I am not able to reproduce this bug in Safari 16.2 shown in the video and Safari matches with Chrome Canary 111 and Firefox Nightly 110. Marking this as "RESOLVED CONFIGURATION CHANGED". Comment 02 also confirm that that it was not happening in STP.