When a change is applied from Simperium, the cursor position should be updated to account for the new content.
For example, if I'm typing at the end of the note and a change comes in that modifies the beginning of the note by adding six characters, the cursor should be advanced six characters so that as I continue typing I'll be in the correct location.
Reported In:
Note: This means that when a note is saved, or changes come in remotely and are applied, that we sort out where the cursor was before the change was applied and restore it.
This is the moment in the app where the cursor position change will need to be calculated.
An example of how to calculate the cursor change can be found in the existing simperium-js codebase.
While working on the Monaco interface I built this so that we wouldn't have to destroy the editor context the way we have been. Many issues will be simultaneously solved: wonky cursors, losing the undo history, accidentally undoing remote changes, etc…
I felt like having access to the patch itself would be highly valuable and I'd like to expose more deeply the underlying data changes to the notes. For example, there are good ideas to show activity based on what segments of a note have been recently changed.
Getting the cursor shift introduced from a patch then became trivial after having the parsed form in app state.
I'm on simplenote v1.3.2 on solus linux.
I experience a very annyoing issue with this version.
Once a note reaches a certain length the cursor begins to randomly jump to the bottom of the note.
Simplenote is kinda unusable because of this.
Video demonstration of the bug occuring (timestamps when it occurs 1:00, 1:27, 1:42, 1:52):
I think this is related in 1637228-zen. A Linux user writes,
I've been using Simplenote for 8 months and I noticed that the cursor don't follow on page scroll.
It means that if I have a long note, if the cursor is set at the bottom of the page then I hit enter. The page didn't scroll. It hard for me to just continue typing and be not able to see the latest update of my note.
Is there any update? I love Simplenote but it is barely usable because of this bug. I tried to update and reinstall, but there is no solution.
Another report here: 1641635-zen
The cursor jumps to the end of the file, even if you are in somewhere else in the note.
It seemed to occur when the note was synced. At the end of the sync the cursor went to the end position of the note. However, it was not with every sync.
I have been doing testing and, although the problem persists after reinstall the software, it seems to not appear anymore after deleting the folder ~/.config/Simplenote/. Of course, you have to login again but the application turns useful, which is nice.
If another user can report this as a solution, perhaps it can help focusing the debugging.
Can confirm.
Deleting the folder ~/.config/Simplenote/ makes the app usable again. Thanks for pointing out this workaround.
Seeing the same (just started for me with 1.4). Above fix also worked.
I'm also seeing this on v1.4.0 on linux mint 18.3, however deleting the folder ~/.config/Simplenote/ did not fix the issue.
Strange that this only happens on Linux, as far as I can tell. Maybe our bump to Electron 4 that we're working on will help with this.
Following the most recent update for Simplenote on Windows, I'm regularly encountering the cursor issue described in #292: "Cursor jumps to bottom of the note while editing".
I'd experienced this bug previously (many months ago, in 2018, and perhaps even prior to then), before it seemed to resolve for a good time, only to now arise again.
Another report of this happening in Windows 10 received via Twitter today.
I am also having this problem on linux. Deleting .config/Simplnote seemed to work until I edited a note on the ios app, and then came back to editing it on the linux app. I add text to the top to keep a daily journal of my classes so this jumping to the bottom is very annoying. Seemed to start upon update to 1.4. Hope the note about switching between iOS and linux apps helps.
Thanks @ehremington, I was able to reproduce by:
So this could happen easily with shared notes, or any other scenario where you can receive a remote change.
Does this look to be the same issue as #1185?
This was fixed some time ago for me.
Closing as reported as fixed
Most helpful comment
Thanks @ehremington, I was able to reproduce by:
So this could happen easily with shared notes, or any other scenario where you can receive a remote change.