From 07f514653416d994a835acfc85f32170c90511ae Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sat, 17 Dec 2022 20:49:39 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=83=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Reader/SearchPage/SearchPage.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/client/components/Reader/SearchPage/SearchPage.vue b/client/components/Reader/SearchPage/SearchPage.vue index 16786efe..1997a433 100644 --- a/client/components/Reader/SearchPage/SearchPage.vue +++ b/client/components/Reader/SearchPage/SearchPage.vue @@ -20,10 +20,10 @@ - + - + @@ -108,10 +108,15 @@ class SearchPage { this.header = 'Поиск в тексте'; await this.$nextTick(); - this.$refs.input.focus(); + this.focusInput(); this.$refs.input.select(); } + focusInput() { + if (!this.$root.isMobileDevice) + this.$refs.input.focus(); + } + get foundText() { if (this.foundList.length && this.foundCur >= 0) return `${this.foundCur + 1}/${this.foundList.length}`; @@ -149,7 +154,8 @@ class SearchPage { } else { this.$emit('stop-text-search'); } - this.$refs.input.focus(); + + this.focusInput(); } showPrev() { @@ -165,7 +171,8 @@ class SearchPage { } else { this.$emit('stop-text-search'); } - this.$refs.input.focus(); + + this.focusInput(); } close() {