joplin
joplin copied to clipboard
Search field focus is steal on layout change
The search field loses focus if a plugin or command change the editor (markdown or rich text) or the layout (splitview, preview) with toggleVisiblePanes
and toggleEditors
.
For the plugins, the problem has become worse since the performance optimization of Joplin, because the list is updated quickly and therefore a note is displayed more quickly, which then triggers the command. This happens all the time when you only pause for a moment when entering text in the search box.
Environment
Joplin 2.8.6 (prod, win32)
Client ID: 6c4a316296944e2eb07a539f4d50eeb1 Sync Version: 3 Profile Version: 41 Keychain Supported: Yes
Revision: 2486c78
Steps to reproduce
Manually:
- Set Layout to preview
- Start searching
- Use shortcut to switch the Layout
Ctr+L
- Now the editor window has the focus
Plugin:
- Install Persist Editor Layout Plugin
- Add the tag
layout:viewer
for the4. Tips
note in theWelcome! (Desktop)
- Configure in the Persist Editor Layout Plugin settings the
Default editor layout
toSplit View
- Search for
tips
and wait a second - Search list is updated and the focus of the search field is steal through the plugin API commandos
toggleVisiblePanes
/toggleEditors
.
Describe what you expected to happen
The focus should remain in the search field
Additional information
https://github.com/benji300/joplin-persistent-layout/issues/12 https://discourse.joplinapp.org/t/persist-editor-layout-plugin/14411/47 https://discourse.joplinapp.org/t/i-have-found-some-problems-using-joplin-search-feature/25561
Plugins that cause the problem
- Auto show active note in sidebar v1.0.1
- Persistent Editor Layout v2.2.0
Joplin 2.9.4 - there's still a bug here.
I'm still losing focus from the search box while typing a search. It seems to happen consistently when I do the reverse of the steps for reproducing above: switching from preview to editor view steals the focus from the search box.
@JackGruber Can you confirm this is still occurring?
No the error for stealing the focus of the search field in combination with plugins and the toggleVisiblePanes
/ toggleEditors
command was fixed.
No the error for stealing the focus of the search field in combination with plugins and the
toggleVisiblePanes
/toggleEditors
command was fixed.
I'm on 2.9.4, and I'm still having focus stealing during search as described above.
@laurent22 Could you reopen the Issue or should I create a new one.
It seems that the problem now occurs again when switching from viewer to editor during the search (With the persistent layout plugin) or if you scroll up and down in the note list with the arrow keys and the layout is switched through the plugin persistent layout.
This also happens when the layout is changed with Ctrl+L
I tested this with Joplin 2.9.17
and 2.10.13
Is that he exact same problem with the same steps to reproduce?
Yes, the problem can be reproduced with the plugin and manual steps from the Issue.
The error occurs again in version 2.9.12
and higher
Any update on this one? I see release notes stating that search focus issues were fixed in pre-release versions over the past month, but this issue seems to still be occurring.
Error is still there on 2.11.2
@laurent22 @JackGruber
Is this a fix for this issue?
https://github.com/laurent22/joplin/commit/489d6778dbd3df5372d198a23af1b36416b0f5c0
Or is there something else that causes loss of focus as described here?
The problem still exist in 2.11.9
It's still there in 2.11.11.
Is this not getting fixed because of the Plugin label? It's triggered by a plugin, but the cause isn't a plugin.
This problem still occurs, if the "outline" plugin has the "auto hide" option switched on.