Skip to content

Commit 8a3fb5c

Browse files
committed
do not focus input on mobile
Signed-off-by: Simon L <[email protected]>
1 parent c5fd922 commit 8a3fb5c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/NewMessageForm/NewMessageForm.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,9 @@ export default {
880880
},
881881
882882
focusInput() {
883+
if (this.isMobile()) {
884+
return
885+
}
883886
this.$nextTick().then(() => {
884887
this.$refs.richContenteditable.$refs.contenteditable.focus()
885888
})
@@ -896,6 +899,10 @@ export default {
896899
this.blurInput()
897900
}
898901
},
902+
903+
isMobile() {
904+
return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent)
905+
},
899906
},
900907
}
901908
</script>

0 commit comments

Comments
 (0)