joplin
joplin copied to clipboard
When creating a note or to-do, focus is not set correctly
The focus should be either the note title or body, depending on the settings, but currently this is broken. It briefly focuses the title or body, and then something else steals the focus (maybe the note list?)
Hey @laurent22, I tested this issue, it seems to me that it only happens if we click on New Note
/New Todo
twice.
Screencast from 2024-03-13 11-19-20.webm
OS: Linux (Fedora)
Hey, I think the problem can be resolved by explicitly setting the focus to the text area. This is my first issue in the codebase, so can I work on this issue and try fixing it so that I get to learn about the codebase?
In my testing, there's two different behaviors depending on the following conditions:
- If there is no other notes in the notebook, focus is not set at all. This is likely the environment of this issue.
- If there is at least one other note in the notebook, then the behavior that @Shivam164 described occurs where it only occurs when clicking on "New Note" twice
I've been looking into fixing this; I'm guessing there is actually a missing function or the code to focus on the textbox of the note is out of order since the app doesn't seem to be even trying to focus on the created note given the focus event listener in the devtools doesn't fire at all, but please correct me if I am wrong.