From c0246909c0c4a76e55ed16e323425eea2bce79bf Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 11 Feb 2024 17:15:22 +0000 Subject: [PATCH] Fixed focus grabbing. --- src/mami.js/ui/hooks.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mami.js/ui/hooks.js b/src/mami.js/ui/hooks.js index 35d7e80..af324f9 100644 --- a/src/mami.js/ui/hooks.js +++ b/src/mami.js/ui/hooks.js @@ -122,7 +122,10 @@ Umi.UI.Hooks = (function() { window.addEventListener('keydown', function(ev) { - if(!ev.target.matches('input, textarea')) + if((ev.ctrlKey && ev.key !== 'v') || ev.altKey) + return; + + if(!ev.target.matches('input, textarea, select')) $i('umi-msg-text').focus(); });