From dbf4885f99fc635e8a0a701ab9539bcc0852638e Mon Sep 17 00:00:00 2001 From: Sam Hariri <137707942+samh-nl@users.noreply.github.com> Date: Fri, 4 Aug 2023 10:59:20 +0200 Subject: [PATCH] fix: do not focus composer when space is pressed --- src/pages/home/report/ReportActionCompose.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 0356368bd1a6..0942c329e6a0 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -730,6 +730,11 @@ class ReportActionCompose extends React.Component { return; } + // If the space key is pressed, do not focus + if (e.code === 'Space') { + return; + } + // if we're typing on another input/text area, do not focus if (['INPUT', 'TEXTAREA'].includes(e.target.nodeName)) { return;