Joplin: Markdown editor snaps to the top after note editing

Created on 9 Oct 2020  ·  3Comments  ·  Source: laurent22/joplin

Environment

Joplin version: Joplin 1.1.4
Platform: Linux
OS specifics: Ubuntu 20.04

Steps to reproduce

  1. Edit a note (content greater than viewport) in the markdown editor - works as usual.
  2. Now, set a search query (F6), which finds above note again. Select it.
  3. Repeat step 1 - now the editor snaps to the top of the note with each key press/note edit.
  4. Removing the search query does not help unfortunately.

joplin

Describe what you expected to happen

The editor keeps its current location, otherwise editing (larger) notes becomes impossible.

It also would be useful to delete a search query completely. This doesn't seem to be possible at the moment by pressing the x button right of the search. E.g. search words are still marked.

Logfile

console:

/tmp/.mount_Joplinn84QMK/resources/app.asar/lib/services/CommandService.js:141 CommandService::execute: search {query: "privacy", fuzzy: 1}
/tmp/.mount_Joplinn84QMK/resources/app.asar/gui/MainScreen/commands/search.js:22 RUNTIME privacy
/tmp/.mount_Joplinn84QMK/resources/app.asar/lib/services/CommandService.js:141 CommandService::execute: search {query: "", fuzzy: 1}
/tmp/.mount_Joplinn84QMK/resources/app.asar/gui/MainScreen/commands/search.js:22 RUNTIME 

excerpt log.txt:

2020-10-09 08:20:06: "Synchroniser is missing credentials - manual sync required to authenticate."
2020-10-09 08:20:06: "Updating all notifications..."
2020-10-09 08:20:06: "Garbage collecting alarms..."
2020-10-09 08:20:07: "DecryptionWorker: cannot start because no master key is currently loaded."
2020-10-09 08:20:09: "RevisionService::maintenance: Starting..."
2020-10-09 08:20:09: "RevisionService::maintenance: Service is enabled"
2020-10-09 08:20:09: "RevisionService::collectRevisions:", "URIError: URI malformed
URIError: URI malformed
    at encodeURI (<anonymous>)
    at diff_match_patch.patch_obj.toString (/tmp/.mount_Joplinvqk3HG/resources/app.asar/node_modules/diff-match-patch/index.js:2179:24)
    at Array.join (<anonymous>)
    at diff_match_patch.patch_toText (/tmp/.mount_Joplinvqk3HG/resources/app.asar/node_modules/diff-match-patch/index.js:2043:15)
    at Function.createTextPatch (/tmp/.mount_Joplinvqk3HG/resources/app.asar/lib/models/Revision.js:20:14)
    at RevisionService.createNoteRevision_ (/tmp/.mount_Joplinvqk3HG/resources/app.asar/lib/services/RevisionService.js:95:32)
    at async RevisionService.collectRevisions (/tmp/.mount_Joplinvqk3HG/resources/app.asar/lib/services/RevisionService.js:151:20)
    at async RevisionService.maintenance (/tmp/.mount_Joplinvqk3HG/resources/app.asar/lib/services/RevisionService.js:255:5)"
2020-10-09 08:20:09: "RevisionService::collectRevisions: Created revisions for 0 notes"
2020-10-09 08:20:09: "RevisionService::maintenance: Done in 117ms"
2020-10-09 08:20:11: "Saving note...", "{"id":"adfdfc021ded4f48aaa99416dfb4ef85","parent_id":"195021b98ada4c6aa01f369479a917a5","title":"5. Privacy","body":"# Privacy\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo  \n  \nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfooddd\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo"}"
2020-10-09 08:20:11: "Scheduling sync operation...", "30000"
2020-10-09 08:20:15: "Refreshing notes:", "7", "884fec9d47834136bc6cfc338fce4df8"
2020-10-09 08:20:15: "SearchEngine: Updating FTS table..."
2020-10-09 08:20:15: "SearchEngine: Updated FTS table in 74ms. Inserted: 1. Deleted: 0"
2020-10-09 08:20:19: "Saving note...", "{"id":"adfdfc021ded4f48aaa99416dfb4ef85","parent_id":"195021b98ada4c6aa01f369479a917a5","title":"5. Privacy","body":"# Privacy\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo  \n  \nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoodddd\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo\n\nfoo"}"
2020-10-09 08:20:19: "Scheduling sync operation...", "30000"

Possibly related: https://github.com/laurent22/joplin/issues/3865

bug

All 3 comments

I believe this has been fixed in a recent commit.

@bela53 thank you for the detailed report, please update your Joplin version to v1.2.6 to fix this issue.

Can confirm, it works now. Thanks for the quick info!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jurgenhaas picture jurgenhaas  ·  3Comments

hakim89 picture hakim89  ·  3Comments

jacobgonzales20 picture jacobgonzales20  ·  3Comments

yschutz picture yschutz  ·  3Comments

alexanderadam picture alexanderadam  ·  3Comments