Quick search hot key triggers when text input is focused #54

Closed
opened 2020-09-27 10:59:23 +02:00 by Serraniel · 6 comments
Serraniel commented 2020-09-27 10:59:23 +02:00 (Migrated from github.com)

When a text input element is focused and the user presses Shift + F with the intention to type a captial F the quick search is focused instead.

When a text input element is focused and the user presses `Shift` + `F` with the intention to type a captial *F* the quick search is focused instead.
Serraniel commented 2020-09-27 11:01:22 +02:00 (Migrated from github.com)

Possible soloution would be to either prevent the event when some type of text input is focused or to change the hotkey. I don´t know yet what the best option would be. Overwriting Ctrl + F is not an option for me personally, don´t know about maybe Alt + F or maybe Ctrl + Shift + F?

Possible soloution would be to either prevent the event when some type of text input is focused or to change the hotkey. I don´t know yet what the best option would be. Overwriting `Ctrl` + `F` is not an option for me personally, don´t know about maybe `Alt` + `F` or maybe `Ctrl` + `Shift` + `F`?
kaffem commented 2020-09-30 19:19:30 +02:00 (Migrated from github.com)

I personally would go for Ctrl + Shift + F.

I personally would go for `Ctrl` + `Shift` + `F`.
Serraniel commented 2020-09-30 19:27:59 +02:00 (Migrated from github.com)

I´ll do this then.

I´ll do this then.
Serraniel commented 2020-09-30 19:47:57 +02:00 (Migrated from github.com)

Maybe not as easy decission as it sounds like.

  1. In Chrome, the event.key becomes some Unicode char () while in Firefox it still is an F.
  2. The other big problem: it really is hard to trigger the event itself in firefox when pressing ctrl. Seems like the browser prevents this while listening to its own hotkeys.

image

Maybe not as easy decission as it sounds like. 1) In Chrome, the `event.key` becomes some Unicode char (``) while in Firefox it still is an `F`. 2) The other big problem: it really is hard to trigger the event itself in firefox when pressing `ctrl`. Seems like the browser prevents this while listening to its own hotkeys. ![image](https://user-images.githubusercontent.com/8461282/94721249-e42a1a00-0355-11eb-8002-25ef20625976.png)
Serraniel commented 2020-09-30 20:09:47 +02:00 (Migrated from github.com)

So, I decided to just add a check if the document.activeElement is some kind of input ot contentEditable and prevent the hotkey then as a quick fix.
The behaviour might be improved in future if we found a better solution.

So, I decided to just add a check if the `document.activeElement` is some kind of input ot contentEditable and prevent the hotkey then as a quick fix. The behaviour might be improved in future if we found a better solution.
Serraniel commented 2020-10-01 22:39:13 +02:00 (Migrated from github.com)
Fixed with https://github.com/Serraniel/AniwatchPlus/releases/tag/0.2.0.0-beta.0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Serraniel/AniwatchPlus#54
No description provided.