From 0f90f85347c393d24ee39947041028f567512af5 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Tue, 25 Feb 2020 16:39:50 +0100 Subject: viewer: removing a tag from the filters opens the keyboard on mobile GitHub: Resolves #93 --- viewer/src/components/LdTagInput.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue index d9d932f..34d96bd 100644 --- a/viewer/src/components/LdTagInput.vue +++ b/viewer/src/components/LdTagInput.vue @@ -30,6 +30,7 @@ size="is-medium" class="paneltag-input" @typing="searchTags" + @click.capture.native="onClick" > @@ -58,6 +59,13 @@ export default class LdTagInput extends Vue { .filter(newSearch => !this.model.find(currentSearch => currentSearch.tag === newSearch.tag)) .sort((a, b) => b.items.length - a.items.length); } + + // Prevents the keyboard from opening on mobile when removing a tag + onClick(e: MouseEvent) { + const target = e.target; + if (target instanceof HTMLAnchorElement) + target.addEventListener("click", e => e.stopPropagation()); + } } -- cgit v1.2.3