Refocusing chat-txt-field after sending a message.
@@ -22,7 +22,7 @@ function genComponentConf() {
<div class="wdt__left">
<div class="wdt__text"
ng-class="{ 'valid' : self.valid(), 'invalid' : !self.valid() }">
- <div class="medium-mount"></div>
+ <div class="medium-mount" tabindex="0"></div>
</div>
<span class="wdt__charcount" ng-show="self.maxChars">
{{ self.charactersLeft() }} characters left
@@ -94,6 +94,8 @@ function genComponentConf() {
dispatchEvent(this.$element[0], 'submit', payload);
this.medium.clear(); // clear text
+
+ this.mediumMount().focus(); //refocus so people can keep writing
}
}
charactersLeft() {
