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
Keybindings override #33
Comments
Bro, just click outside the menu |
I know, but there should be way to do it without mouse in that case |
type something that gives 0 results [like hhhhhhhhhhhhhhh] and press enter |
I've been looking into this and honestly I haven't found a solution. I see on Telegram it requires pressing the Esc key two times to work, it can certainly be a bit annoying. Unsure if I can do anything about it, I considered making the Esc key an "official" command, but if you had an extension that was also using it that would cause issues. Would be interested to see if anyone knows how this could work - I'm assuming it's due to some event.stopPropagation() call? |
making an |
Yes, closeOmni() makes the omnisearch close, the problem is how to make it trigger on the Esc key when Telegram seems to prevent it from propagating. |
Wont making an action |
Or better, why not inject |
No, there are many ways to close Omni already (clicking outside the omnisearch, pressing Esc, and pressing on the extension icon), and they all should work.
This wouldn't solve anything, the keypress event would still not propagate. |
onkeydown = function(e){
if(e.escKey.charCodeAt(0)){
e.preventDefault();
}
} ig this would work |
Doesn't quite work, I ended up doing a different thing though and managed to fix it. A bit weird but basically listening for the keyup event outside jQuery did work, so I used that and then closed it through there. |
If current tab has actions on keyboard (like escape key in telegram web) it overrides action in Omni, and Omni does not closing
The text was updated successfully, but these errors were encountered: