Skip to content

Commit

Permalink
Update Chat.vue
Browse files Browse the repository at this point in the history
Updated to make the chat input the focus when chat loads.
  • Loading branch information
SalleeMatthew authored and smile0711 committed Aug 27, 2024
1 parent 3eac054 commit 18c35ad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spa/src/components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
class="flex-grow p-0.5 text-black"
@keyup.exact.enter="sendMessage"
maxlength="255"
v-focus
/>
<button
type="button"
Expand Down Expand Up @@ -405,6 +406,13 @@ export default Vue.extend({
pingIntervalId: null,
};
},
directives: {
focus: {
inserted: function (el) {
el.focus()
}
}
},
methods: {
handler: function(e) {
this.userMenu = true;
Expand Down

0 comments on commit 18c35ad

Please sign in to comment.