aboutsummaryrefslogtreecommitdiff
path: root/viewer/src
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src')
-rw-r--r--viewer/src/components/LdTagInput.vue7
1 files changed, 7 insertions, 0 deletions
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue
index d9d932f..ad0845e 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,12 @@ 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) target.addEventListener("click", e => e.stopPropagation(), true);
67 }
61} 68}
62</script> 69</script>
63 70