chore: Send typing events on keyup, not on focus (#1461)

This commit is contained in:
Pranav Raj S
2020-11-27 00:17:55 +05:30
committed by GitHub
parent a988724c91
commit f397c0c087
3 changed files with 41 additions and 6 deletions

View File

@@ -19,6 +19,8 @@
class="input"
:placeholder="messagePlaceHolder"
:min-height="4"
@typing-off="onTypingOff"
@typing-on="onTypingOn"
@focus="onFocus"
@blur="onBlur"
/>
@@ -298,13 +300,17 @@ export default {
hideCannedResponse() {
this.showCannedResponsesList = false;
},
onTypingOn() {
this.toggleTyping('on');
},
onTypingOff() {
this.toggleTyping('off');
},
onBlur() {
this.isFocused = false;
this.toggleTyping('off');
},
onFocus() {
this.isFocused = true;
this.toggleTyping('on');
},
toggleTyping(status) {
if (this.isAWebWidgetInbox && !this.isPrivate) {