Text cursor placement incorrect after pasting text on list

Steps to reproduce

Turn on “Readable line length”.

  1. Start a blank document and create a list. The list can either be ordered (1.) or unordered (-). The scrollbar for the note should not be present yet.
  2. To make this easier to reproduce, copy about one line’s worth of text into your clipboard and hold down Ctrl+V. Stop as soon right when the scroll bar appears. If you keep pasting or type after the scroll bar appears, the bug corrects itself.

Expected result

Following the above procedure, the text cursor should always be at the end of the most recently pasted text.

Actual result

The cursor is no longer at the end of the current text. Trying to use the arrow keys, pressing End, or pressing Ctrl+End does not place the cursor at the end of the line. However, typing additional text places it at the correct location.

Environment

  • Operating system: Windows 10 version 2004
  • Obsidian version: 0.8.12, turned off custom CSS for testing

7 posts were merged into an existing topic: Pasting long enough block causes cursor position and text buffer to get confused