From 1ed1dfc78afbf5275e8e55a0750f3b2d2186a51e Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Mon, 13 Dec 2021 14:40:24 +0530 Subject: [PATCH] Fix bug Signed-off-by: Ajay Bura --- src/app/organisms/room/RoomViewInput.jsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/organisms/room/RoomViewInput.jsx b/src/app/organisms/room/RoomViewInput.jsx index 9a9f6f3..ba11014 100644 --- a/src/app/organisms/room/RoomViewInput.jsx +++ b/src/app/organisms/room/RoomViewInput.jsx @@ -45,6 +45,7 @@ function RoomViewInput({ const inputBaseRef = useRef(null); const uploadInputRef = useRef(null); const uploadProgressRef = useRef(null); + const rightOptionsRef = useRef(null); const TYPING_TIMEOUT = 5000; const mx = initMatrix.matrixClient; @@ -88,13 +89,22 @@ function RoomViewInput({ uploadInputRef.current.value = null; } + function rightOptionsA11Y(A11Y) { + const rightOptions = rightOptionsRef.current.children; + for (let index = 0; index < rightOptions.length; index += 1) { + rightOptions[index].tabIndex = A11Y ? 0 : -1; + } + } + function activateCmd(prefix) { isCmdActivated = true; + rightOptionsA11Y(false); viewEvent.emit('cmd_activate', prefix); } function deactivateCmd() { isCmdActivated = false; cmdCursorPos = null; + rightOptionsA11Y(true); } function deactivateCmdAndEmit() { deactivateCmd(); @@ -320,7 +330,7 @@ function RoomViewInput({ {isMarkdown && } -
+
{ const cords = getEventCords(e);