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

Prevent jumping to different document after initial sync #289

Open
raucao opened this issue Dec 27, 2017 · 1 comment
Open

Prevent jumping to different document after initial sync #289

raucao opened this issue Dec 27, 2017 · 1 comment

Comments

@raucao
Copy link

raucao commented Dec 27, 2017

Currently Litewrite will jump to a different document after launch/initial sync (I guess in case another one was active on a different device). This is especially bad when on a slow/mobile connection, but also on desktops when e.g. on a train for example. Worse, when you start writing a new note before sync has finished, you can lose those changes after sync I believe.

I haven't looked into it, but I would assume the cursor position is stored in the remote storage instead of locally. If that's correct, I think the best solution would be to store that bit of information in local storage instead.

@raucao raucao changed the title Don't jump to different document after initial sync Prevent jumping to different document after initial sync Dec 27, 2017
@jorinvo
Copy link
Member

jorinvo commented Dec 29, 2017

I have seen that issue too. It's definitely annoying.

You guessed right regarding the cursor position. But I don't see how cursor position is related to which document is open?

Not sure how to best solve this though. The currently open document is loaded from the URL or whatever document is at the top of the list. I tried changing something. You can give that version a try on http://litewrite.github.io/litewrite, let me know if it works.
Do you have any way to properly reproduce it? Then I could also test it locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants