Add typing outside focus on msg feild (#112)

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura
2021-12-13 14:31:43 +05:30
parent 6d5d40b8e3
commit 5797a1d8e5
6 changed files with 23 additions and 40 deletions

View File

@@ -243,10 +243,7 @@ function RoomViewInput({
const handleKeyDown = (e) => {
if (e.keyCode === 13 && e.shiftKey === false) {
e.preventDefault();
if (isCmdActivated) {
viewEvent.emit('cmd_exe');
} else sendMessage();
sendMessage();
}
};
@@ -298,7 +295,7 @@ function RoomViewInput({
function renderInputs() {
if (!canISend) {
return (
<Text className="room-input__disallowed">You do not have permission to post to this room</Text>
<Text className="room-input__alert">You do not have permission to post to this room</Text>
);
}
return (
@@ -312,6 +309,7 @@ function RoomViewInput({
<ScrollView autoHide>
<Text className="room-input__textarea-wrapper">
<TextareaAutosize
id="message-textarea"
ref={textAreaRef}
onChange={handleMsgTyping}
onPaste={handlePaste}
@@ -385,9 +383,7 @@ function RoomViewInput({
{ attachment !== null && attachFile() }
<form className="room-input" onSubmit={(e) => { e.preventDefault(); }}>
{
roomTimeline.room.isSpaceRoom()
? <Text className="room-input__space" variant="b1">Spaces are yet to be implemented</Text>
: renderInputs()
renderInputs()
}
</form>
</>