From 8a3fb5c45386f4845f556f1c5b2a66127c50f36e Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 1 Mar 2023 13:53:04 +0100 Subject: [PATCH] do not focus input on mobile Signed-off-by: Simon L --- src/components/NewMessageForm/NewMessageForm.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/NewMessageForm/NewMessageForm.vue b/src/components/NewMessageForm/NewMessageForm.vue index d1f9ff4ab16..70e15e465b5 100644 --- a/src/components/NewMessageForm/NewMessageForm.vue +++ b/src/components/NewMessageForm/NewMessageForm.vue @@ -880,6 +880,9 @@ export default { }, focusInput() { + if (this.isMobile()) { + return + } this.$nextTick().then(() => { this.$refs.richContenteditable.$refs.contenteditable.focus() }) @@ -896,6 +899,10 @@ export default { this.blurInput() } }, + + isMobile() { + return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent) + }, }, }