Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore cursor location when note is updated #36

Closed
beaucollins opened this issue Oct 20, 2015 · 19 comments
Closed

Restore cursor location when note is updated #36

beaucollins opened this issue Oct 20, 2015 · 19 comments
Labels
bug Something isn't working enhancement Improve existing functionality [feature] editor Anything related to the editor.
Milestone

Comments

@beaucollins
Copy link
Contributor

beaucollins commented Oct 20, 2015

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:

  • #2642910-t
  • #864118-zen
  • #958281-zen
  • #757894-zen
  • #808817-zen
  • #1193660-zen
@beaucollins beaucollins added the enhancement Improve existing functionality label Oct 20, 2015
@roundhill
Copy link
Contributor

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.

@roundhill roundhill added the [priority] low Address this when there is time label Nov 4, 2015
@roundhill roundhill added this to the 1.0 milestone Nov 4, 2015
@beaucollins
Copy link
Contributor Author

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.

@roundhill roundhill removed this from the 1.0 milestone Feb 10, 2016
@davewhitley davewhitley modified the milestone: Future Mar 18, 2016
@davewhitley davewhitley removed the [priority] low Address this when there is time label Apr 2, 2016
@dmsnell
Copy link
Member

dmsnell commented Feb 19, 2018

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.

@7underlines
Copy link

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):

2018-12-11 13-01-39.zip

@jessestu
Copy link

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.

@msolefonte
Copy link

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.

@brezocordero
Copy link

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.

@msolefonte
Copy link

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.

@7underlines
Copy link

Can confirm.
Deleting the folder ~/.config/Simplenote/ makes the app usable again. Thanks for pointing out this workaround.

@BackSeat
Copy link

Seeing the same (just started for me with 1.4). Above fix also worked.

@rob-01
Copy link

rob-01 commented Jan 31, 2019

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.

@roundhill
Copy link
Contributor

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.

@denismcdonald
Copy link
Contributor

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.

@KokkieH
Copy link

KokkieH commented Feb 1, 2019

Another report of this happening in Windows 10 received via Twitter today.

@ehremington
Copy link

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.

@roundhill
Copy link
Contributor

Thanks @ehremington, I was able to reproduce by:

  • Opening up the same note on two different apps, one of them being Electron.
  • Place the cursor somewhere in the note in the Electron app.
  • Make a change to the note on the other app.
  • The cursor jumps to the bottom in Electron.

So this could happen easily with shared notes, or any other scenario where you can receive a remote change.

@ehremington
Copy link

Does this look to be the same issue as #1185?

@ehremington
Copy link

This was fixed some time ago for me.

@belcherj
Copy link
Contributor

belcherj commented Aug 8, 2019

Closing as reported as fixed

@belcherj belcherj closed this as completed Aug 8, 2019
@codebykat codebykat modified the milestones: Future, 1.4.1 Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Improve existing functionality [feature] editor Anything related to the editor.
Projects
None yet
Development

No branches or pull requests