aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components
diff options
context:
space:
mode:
authorZero~Informatique2020-02-25 16:39:50 +0100
committerZero~Informatique2020-02-25 16:39:50 +0100
commit0f90f85347c393d24ee39947041028f567512af5 (patch)
tree5902c638742f317c0edcdc14d6e660c54faafbd0 /viewer/src/components
parent1ee205fd6cde9ee43330fb37fc408d0b6ef07bf1 (diff)
downloadldgallery-0f90f85347c393d24ee39947041028f567512af5.tar.gz
viewer: removing a tag from the filters opens the keyboard on mobile
GitHub: Resolves #93
Diffstat (limited to 'viewer/src/components')
-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