diff --git a/doc/changelog.md b/doc/changelog.md index 28e7e7e12..00706aa90 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -29,7 +29,7 @@ Syntax: `- short text describing the change _(Your Name)_` - _()_ - _()_ - _()_ -- _()_ +- Fixed bug to reenable Ctrl+A in text inputes _(Daniel Steinkogler)_ - _()_ - _()_ - _()_ diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d540a272c..b11daf489 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -49,7 +49,14 @@ const useAuthEffect = () => { }; const handleGlobalKeyDown = (event: KeyboardEvent): void => { - // Prevent the default behavior of Ctrl+A to select all text + // Prevent the default behavior of Ctrl+A to select all text if the focus is not on an input or textarea + if ( + document?.activeElement?.tagName === 'INPUT' || + document?.activeElement?.tagName === 'TEXTAREA' + ) { + return; + } + if (event.ctrlKey && event.key === 'a') { event.preventDefault(); }