mgsloan / todoist-shortcuts

Browser extension which adds comprehensive keyboard shortcuts to Todoist, beyond what is offered by Todoist itself
MIT License
313 stars 23 forks source link

Task Pane Steals Focus from Search Bar #231

Closed jakelfreeman closed 1 year ago

jakelfreeman commented 1 year ago

I'm experiencing an issue after typing in the search box--when I press enter to execute the search, the app goes into edit mode on the active task in the task pane rather than executing the search. I've confirmed that the issue is with this extension, not the app itself or another extension. Running v2852 on Chrome.

jakelfreeman commented 1 year ago

Can anyone else confirm whether they're experiencing this issue? Still happening in v2882(beta) for me

mgsloan commented 1 year ago

Initially I couldn't reproduce this issue, but I think I may have found a way! If I do a very quick enter keystroke like usual nothing happens. However, if I do a longer hold before releasing, it does trigger todoist-shortcut's binding for "enter", to edit the task focused. I can't try to fix this today, but will try to soonish

On Wed, Dec 21, 2022 at 6:27 AM jakelfreeman @.***> wrote:

Can anyone else confirm whether they're experiencing this issue? Still happening in v2882(beta) for me

— Reply to this email directly, view it on GitHub https://github.com/mgsloan/todoist-shortcuts/issues/231#issuecomment-1361380901, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFQKRWMJ42HP3UZU3DYULWOMHVHANCNFSM6AAAAAAS6R4UXY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jakelfreeman commented 1 year ago

Thank you! I'm unclear as to why duration of keypress would make a difference, but regardless, very much appreciate your help & attention.

anton2020 commented 1 year ago

I can confirm I'm having exactly this issue. Keystroke speed does not seem to matter in my case, otherwise it's exactly as described in the initial post. Would be great to have this fixed as search is almost unusable for now, sadly... MacOS 12.6.2, latest Brave browser.

mgsloan commented 1 year ago

Oh, just noticed this issue specifies "task pane". If the problem was invoking todoist-shortcuts' handler, then it would be opening the inline task editor instead of the modal dialog.

So, if it is opening the task pane then that means somehow Todoist's native enter shortcut is getting triggered. Clearly this is due to some interaction with todoist-shortcuts if it goes away when the extension is disabled, unfortunately the code for intervening on keyboard handling is pretty convoluted

jakelfreeman commented 1 year ago

What does this mean from a solution standpoint? I'm very surprised that only myself and one other user seem to be having a problem because the bug inhibits a pretty critical piece of functionality (effectively I'm unable to execute a search without use of the mouse). See the attached video which shows what happens when a search is typed and I try to navigate through the auto-populate items with my arrow keys (winds up navigating through the tasks instead) and then try to execute the search with the enter key (enters edit mode with the highlighted text instead). Any ideas how I can go about fixing this?

https://user-images.githubusercontent.com/3990322/212556154-22a53f45-b6b8-492a-a3f4-13aab7e59ae0.mov

mgsloan commented 1 year ago

Ahh, thank you for the video, that was helpful! I think the missing part of the repro steps was to select an item from the dropdown. Once I did that I also see the bug

Happily, the fix (in version 172) also means that arrow keys will now be able to navigate the list of search results whereas before they did not.

anton2020 commented 1 year ago

@mgsloan thank you so much for the fix and for the extension overall, it's such a time saver!