Browse Source

[Glitch] Ignore alt-key hotkeys in text fields

Port 63770d3aac to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
closed-social-glitch-2
ThibG 4 years ago
committed by Thibaut Girka
parent
commit
f7306c7b7c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/features/ui/index.js

+ 1
- 1
app/javascript/flavours/glitch/features/ui/index.js View File

@ -385,7 +385,7 @@ class UI extends React.Component {
componentDidMount () { componentDidMount () {
this.hotkeys.__mousetrap__.stopCallback = (e, element) => { this.hotkeys.__mousetrap__.stopCallback = (e, element) => {
return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName) && !e.altKey;
return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName);
}; };
if (typeof document.hidden !== 'undefined') { // Opera 12.10 and Firefox 18 and later support if (typeof document.hidden !== 'undefined') { // Opera 12.10 and Firefox 18 and later support

Loading…
Cancel
Save