Simplenote-electron: Note does not scroll when typing on an indented line

Created on 20 Nov 2019  路  7Comments  路  Source: Automattic/simplenote-electron

Expected

When you are typing and your cursor goes to the next line, the note editor should scroll so that the cursor is visible

Observed

If the line you are typing on starts with an indent, the note editor does not scroll and you have to scroll manually

Reproduced

  1. Fill up a note with enough lines to cause a scroll bar
  2. At the bottom, start a line with a tab
  3. While on that line, type out a few lines of text

Note: On lines that do not start with an indent, the note editor scrolls as it should. Also this is not a new issue, I've noticed it happening for quite a while but I hadn't narrowed down the indent aspect until now.

Make|Model|OS Version|App Version
-|-|-|-
Asus|Zenbook|Linux Mint 19|Electron 1.10.0

bug

All 7 comments

Actually this appears to be a draftjs error. You can reproduce it with the example editor on https://draftjs.org/

You have to copy-paste the tab in, since tabbing on their editor just moves your focus out of the editor. You also have to scroll up so the line you are typing on is not visible. But the same thing happens. If it's a line that starts with a tab, it does not scroll, otherwise it scrolls normally.

I'll leave this issue here since it may be possible to solve here, but I'll look into opening an issue at draftjs as well.

Wow. This sounds frustrating. Thanks for bringing that up @qualitymanifest and linking it to the draft-js bug. It'll be hard to estimate a timeline on this but we'll be tracking it.

Found the cause in draftjs, I've got a PR pending, I'll post an update when it gets merged or rejected.

The PR has been merged: https://github.com/facebook/draft-js/pull/2256

Now we need to wait for a release. @qualitymanifest You rock!

Thanks! Yeah I was going to say something I was just waiting to see when it made it into a release. Feel free to close this if you want, or leave it open as a reminder to bump the draftjs version

@belcherj draft-js 0.11.4 got published yesterday, just a heads up. Tried installing it in simplenote and it works as expected

I will update today!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rachelmcr picture rachelmcr  路  3Comments

rbreaves picture rbreaves  路  3Comments

gubrist picture gubrist  路  4Comments

uncertainquark picture uncertainquark  路  4Comments

segeeslice picture segeeslice  路  3Comments