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

Layout is not set correctly on search #7

Closed
msbentley opened this issue Feb 4, 2021 · 4 comments
Closed

Layout is not set correctly on search #7

msbentley opened this issue Feb 4, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@msbentley
Copy link

I have tagged my notes, and when clicking from the notelist, this works extremely well. But when I search, the tag is not respected when the first hit in the filtered note-list is displayed. For example:

persistent-layout.mp4

Versions

  • plugin version: v1.1.1
  • joplin version: 1.7.11
  • operating system: linux
  • OS version: ubuntu 20.04
@benji300 benji300 added the bug Something isn't working label Feb 11, 2021
@benji300
Copy link
Owner

benji300 commented Feb 11, 2021

Thanks for your detailed error description. I can confirm the behavior. For example if you have a note selected with layout:split and then search for a note with layout:richtext specified, the layout seems not to change.

But technically it is changed... unfortunately it is changed twice in a row. So it seems it is not switched to the richtext layout. Also it seems only to be a problem if layout:richtext is involved. What I can see is, that the event onNoteSelectionChange() is triggered twice almost in parallel (I guess) when the search is executed. The following screenshot shows some debug messages I've added to the code. It is taken directly after the search was executed. There you can see that toggleEditor is triggered twice because previous check of global setting codeView results in true. Also it shows that onNoteSelectionChange is triggered twice.

image

I've created branch including the debug messages: https://github.com/benji300/joplin-persistent-layout/tree/search-issue-7

@msbentley
Copy link
Author

Thanks @benji300 - do you know if this has been flagged as an issue in the Joplin github?

@ken1kob
Copy link
Contributor

ken1kob commented Sep 11, 2021

Thank you, @benji300, for this very nice plugin.

I analyzed this issue, fixed it and sent a pull request.
The technical detail is very complicated and is described this Joplin's issue.

@benji300
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants