diff options
author | OzoneGrif | 2020-02-27 12:59:17 +0100 |
---|---|---|
committer | GitHub | 2020-02-27 12:59:17 +0100 |
commit | dd1e092af09cc3d780ed546aadf9fc9baa799371 (patch) | |
tree | ccf1dcb86a648abe5237ee6c951e9e7b5b8dbcfb | |
parent | 20790ffcf740103f59ae41386e6c074ce80f7a02 (diff) | |
parent | 4565feaf9ccdc9b215e85f22917bbe300f3a57c4 (diff) | |
download | ldgallery-dd1e092af09cc3d780ed546aadf9fc9baa799371.tar.gz |
Merge pull request #151 from pacien/oz-tag-remove-keyboard
viewer: removing a tag from the filters opens the keyboard on mobile
-rw-r--r-- | viewer/src/components/LdTagInput.vue | 7 |
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 | ||