Hi, I just confirmed that I see the same thing on Mac Joplin 2.4.5 (prod, darwin)
If I click the search box, and then delete all the characters, the search box loses focus. It puts the application back to the last notebook that I was in.
I have a feeling this is because without anything in the search box there is no longer a list of notes to display and so it goes back where you were.
I am able to work around this issue by using Command+Shift+F to bring the search box back into focus without needing to click.
For what it's worth, I feel like your description was clear in English. You can probably submit as is, but it always helps to write out what you want to happen (and obviously the devs will choose whether it is worth fixing or causes other issues).
Was able to reproduce the bug in the environment. It also can be reproduced with space (input only one space --> delete it --> focus is lost).
At the same time I wasn't able to reproduce the conditions required to cause the bug. I tried reproducing on the "dirty" installation with 10k+ notes but it doesn't work (same environment as stated at the top except it is not the snap package, provided .jex wasn't imported).
I tried to collect some logs to catch the associated console output but wasn't able to. The next lines look suspicious but I'm not sure :
[Violation] Forced reflow while executing JavaScript took Nms
[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive.
Here's the log for the next actions performed: launch Joplin, reproduce the bug via provided steps (make sure that focus is lost), exit Joplin search-loses-focus2.log (99.6 KB)