diff options
author | Jim Lin <b04705003@ntu.edu.tw> | 2021-07-04 12:21:06 +0300 |
---|---|---|
committer | Jim Lin <b04705003@ntu.edu.tw> | 2021-07-04 12:21:06 +0300 |
commit | cbfabc9e81ef8357d0275d456b76a244a3854c92 (patch) | |
tree | 99cfdc5ad0d6c0b40b04c107c02971e71a2ca63f | |
parent | c7c0ce5bdfa909617996d984c2015e7777797345 (diff) |
Prevent submitting the message when the user is composing
Signed-off-by: Jim Lin <b04705003@ntu.edu.tw>
-rw-r--r-- | src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue b/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue index ceb13069c..eae9624c5 100644 --- a/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue +++ b/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue @@ -321,6 +321,12 @@ export default { return } + // If the user is stil composing by an input method, + // we should not submit the message + if (event.isComposing) { + return + } + // TODO: add support for CTRL+ENTER new line if (!(event.shiftKey)) { event.preventDefault() |