I found a bug being caused by the plugin. It's very annoying, and can also result in unintentional changes to notes. To replicate:
Open Joplin and set up the plugin to default to Split View. Add a tag (let's call it "Rendered" here) for rendered markdown editor view.
Navigate to a note that is set to go to default view.
Go to the search box, and start typing text that will cause the search results list to bring a note with the Rendered tag to the top of the search results list.
Watch the note switch to the rendered view as it should.
The search box loses focus and the note gains focus! This shouldn't happen.
The loss of focus in the search box is a significant issue. There are two big problems with this:
When typing in the search box, partial results display as one types. For example, if I am searching for "schoolbus", "school" might cause the results list to update and the search box to lose focus, making it impossible to type "schoolbus" without clicking back into the search box. This sort of thing happens all the time, since a few characters in the search box very often brings up results that cause a change in the viewer layout.
If the search results in a note switching from rendered view to split view or markdown view, the note body gains focus. Characters being typed into the search box now begin appearing in the note body, causing unintended changes to the note.
Disabling the plugin makes the above issue go away.
Thanks for this detailed analysis @mzguy... I've created an issue and will have a look at this problem.
@laurent: Is it possible to retrieve the global search status from a plugin? For example, if it is active or was active before the layout switch. So I could disable the layout switching as long as a global search is active or at least set the focus back to the search box. Because I think the loss of focus in the search box is caused by switching the editor layout triggered by the plugin.
No, but I think the bug is that somehow the focus is lost when the plugin is activated. Do you do something to change the focus? If not it might be a bug in the app then, as just switching the layout probably shouldn't steal focus from the search box.