Typing in Search, cursor moves to edit pane

Operating system

Windows

Joplin version

3.4.12

Desktop version info

Joplin 3.4.12 (prod, win32)

Device: win32, Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz
Client ID: 25acf88c8c1f417cbfe2672448c8e680
Sync Version: 3
Profile Version: 48
Keychain Supported: Yes
Alternative instance ID: -

Revision: e9a9f68

Backup: 1.4.3
Freehand Drawing: 3.1.0
Insert Date: 1.0.1
Resume Note: 0.4.0
Tagging: 1.0.3
YesYouKan: 1.0.19

What issue do you have?

typing in search box, suddenly the editor box has some note in it that happens to have a letter that was in search box, and cursor switches to some random place in that note and puts whatever is being typed in search box into the note. bizarre.

It has been happening for while. At first I thought I had clicked in editor, but no. I can repeat it over and over.
any idea what is going on?

I can re-create this as well, the issue seems specific to the Rich text editor (I cannot re-create when using the markdown editor)

Does it happen with a specific note, or all notes, and does it still happen after restarting Joplin?

It seems that I can re-create it with any search (and on a cold launch), as soon as you stop typing the cursor jumps into the rich text editor. in this example the search term is a word found in the body of the note like OPs example:

but I also see the issue when the search term matches something in the title and not the body:

EDIT: I wonder if this could be related to this change, which mentions the cursor location being restored on note switch (and the note being activated during search could be considered a note switch): Desktop: Fixes #13579: Rich Text Editor: Make cursor jump during editing less likely by personalizedrefrigerator · Pull Request #13581 · laurent22/joplin · GitHub

EDIT 2: I'm running 3.5.9, but if OP is running 3.4.x it might not be that as that change was from after 3.4.12 was released. However, it could be possible that the original issue that the change addresses presented the same way with search (i.e. not a regression, the fix just doesn't change this behavior in the search scenario): Desktop: Rich Text editor: Cursor sometimes jumps backward while typing · Issue #13579 · laurent22/joplin · GitHub

I tried re-starting joplin. no change.

interesting. for me it happens in markdown editor, and not in rich text. I hadn’t thought to test between editors.

item in editor changes according to what is being typed in search . so, in markdown, as I type, the note in editor changes to match search, and then continues the search entry typing inside the note.

Does disabling all plugins help? Historically, the diff tool plugin caused a similar issue because it was calling editor.execCommand on note change, which auto-focuses the Rich Text Editor. It's possible that a plugin is running a Joplin command that auto-focuses the note editor as a side effect.

1 Like

in my case it appears to be one of my own plugins lol, after removing all dev plugins it stops happening

I don't see any of mine in OPs plugin list though

EDIT: almost certainly rich tables for me as I do call execCommand on note switch

EDIT 2: I haven't looked at the code, but resume note stands out to me in OPs plugin list

I have tested with different plugins disabled/enabled, and it seems to be ‘resume notes’ that is the problem, in markdown. not in rich text. when it starts putting letters into editor seems to be a function of how fast I am typing. Pause, or slow typing, and it winds up in editor sooner.

Thanks for reporting this @astro46. Linking to the issue, analysis and workaround in Resume Note.