-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Clear search when a new note is created #2399
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
Conversation
The note which we are jumping to may not be available in the note list for a number of reasons (e.g. if there is an active search, or if another storage folder is selected, or if the note list is showing starred notes). This affects both when we are creating a new note (which may not match the current search criteria), and when jumping to a note via a link in another note (and the linked note may not be available for any of the above reasons). 2241
|
Hmm... that's true. The more I'm looking into this issue, the more confused I'm getting. I'm starting to think that the root issue is that the code for jumping to a note by hash (using the That event gets fired when a new note is created (hence this issue), and also when clicking a link to a note from another note ( However, just to add to my confusion, it is possible to jump to a linked note which isn't in the current note list when looking at Starred notes, or notes within a particular Storage folder - in this case, the note is shown in the preview, but doesn't appear in the notes list on the left! I have now idea how this behaviour works, but I'm tempted to say that it is a bug in itself (or at least unintended behaviour), since it leads to a very weird scenario where the note which is in the preview is not the focused note in the note list, and in fact doesn't even appear in the note list. This has led me to thinking that perhaps it should be switching to the
|
|
I've changed my fix in this PR to switch to the '/home' route when jumping to a note by hash. This should solve all of the issues described in my last comment in a consistent manner. |
|
Is it because of me or the old bug is still there? |
|
@Pudge601 What's the status of this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
|
Also fixed this: #2647 |
|
Sorry, I completely missed your comment back in October about it not working :S not sure why it wouldn't have worked when you tested it, but glad it's all sorted now 👍 |




This ensures that the newly created note is visible and selected in the note list.
Fixes #2241