zuck / alighieri

A distraction-free tool for novelists and writers
https://zuck.github.io/alighieri/
MIT License
117 stars 26 forks source link

Newline insertion at EOL fails on desktop application #8

Open pemj opened 3 years ago

pemj commented 3 years ago

Describe the bug On Desktop, when the cursor is positioned at the end of a line of text, pressing enter very briefly moves the cursor down to the next line before returning to where it was before, failing to insert a newline.

To Reproduce Steps to reproduce the behavior:

  1. Install the Windows application
  2. Open the application
  3. Type some text
  4. Press enter
  5. Observe the cursor move down and then snap back up

Expected behavior If your cursor is positioned to the right of all text on a line, pressing enter should move the cursor down one line, thereby allowing you to type text on the next line.

Screenshots Hard to capture this in a static image.

Desktop (please complete the following information):

Additional context There appear to be two workarounds for entering newlines at the moment:

  1. Navigate to a character before the end of the line, press enter, and move that character to the next line along with the cursor.
  2. If you press another key at just the right time when you're trying to insert a newline, (whenever the cursor is at the next line before it snaps back up?), that character will be inserted at the start of the next line, and the cursor will be positioned after it, basically the way you'd expect.
zuck commented 2 years ago

I confirm the bug. Should be fixed in the next release based on TipTap v2.

Thank you for reporting this!