Fix bug
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
5797a1d8e5
commit
1ed1dfc78a
1 changed files with 11 additions and 1 deletions
|
@ -45,6 +45,7 @@ function RoomViewInput({
|
||||||
const inputBaseRef = useRef(null);
|
const inputBaseRef = useRef(null);
|
||||||
const uploadInputRef = useRef(null);
|
const uploadInputRef = useRef(null);
|
||||||
const uploadProgressRef = useRef(null);
|
const uploadProgressRef = useRef(null);
|
||||||
|
const rightOptionsRef = useRef(null);
|
||||||
|
|
||||||
const TYPING_TIMEOUT = 5000;
|
const TYPING_TIMEOUT = 5000;
|
||||||
const mx = initMatrix.matrixClient;
|
const mx = initMatrix.matrixClient;
|
||||||
|
@ -88,13 +89,22 @@ function RoomViewInput({
|
||||||
uploadInputRef.current.value = null;
|
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) {
|
function activateCmd(prefix) {
|
||||||
isCmdActivated = true;
|
isCmdActivated = true;
|
||||||
|
rightOptionsA11Y(false);
|
||||||
viewEvent.emit('cmd_activate', prefix);
|
viewEvent.emit('cmd_activate', prefix);
|
||||||
}
|
}
|
||||||
function deactivateCmd() {
|
function deactivateCmd() {
|
||||||
isCmdActivated = false;
|
isCmdActivated = false;
|
||||||
cmdCursorPos = null;
|
cmdCursorPos = null;
|
||||||
|
rightOptionsA11Y(true);
|
||||||
}
|
}
|
||||||
function deactivateCmdAndEmit() {
|
function deactivateCmdAndEmit() {
|
||||||
deactivateCmd();
|
deactivateCmd();
|
||||||
|
@ -320,7 +330,7 @@ function RoomViewInput({
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
{isMarkdown && <RawIcon size="extra-small" src={MarkdownIC} />}
|
{isMarkdown && <RawIcon size="extra-small" src={MarkdownIC} />}
|
||||||
</div>
|
</div>
|
||||||
<div className="room-input__option-container">
|
<div ref={rightOptionsRef} className="room-input__option-container">
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
const cords = getEventCords(e);
|
const cords = getEventCords(e);
|
||||||
|
|
Loading…
Reference in a new issue