aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
Diffstat (limited to 'viewer')
-rw-r--r--viewer/src/components/LdTagInput.vue8
1 files changed, 8 insertions, 0 deletions
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 @@
30 size="is-medium" 30 size="is-medium"
31 class="paneltag-input" 31 class="paneltag-input"
32 @typing="searchTags" 32 @typing="searchTags"
33 @click.capture.native="onClick"
33 > 34 >
34 <template slot-scope="props">{{displayOption(props.option)}}</template> 35 <template slot-scope="props">{{displayOption(props.option)}}</template>
35 <template slot="empty">{{$t('tagInput.nomatch')}}</template> 36 <template slot="empty">{{$t('tagInput.nomatch')}}</template>
@@ -58,6 +59,13 @@ export default class LdTagInput extends Vue {
58 .filter(newSearch => !this.model.find(currentSearch => currentSearch.tag === newSearch.tag)) 59 .filter(newSearch => !this.model.find(currentSearch => currentSearch.tag === newSearch.tag))
59 .sort((a, b) => b.items.length - a.items.length); 60 .sort((a, b) => b.items.length - a.items.length);
60 } 61 }
62
63 // Prevents the keyboard from opening on mobile when removing a tag
64 onClick(e: MouseEvent) {
65 const target = e.target;
66 if (target instanceof HTMLAnchorElement)
67 target.addEventListener("click", e => e.stopPropagation());
68 }
61} 69}
62</script> 70</script>
63 71