# HG changeset patch # User Alexandre Segura # Date 1488218932 -3600 # Node ID 380450f0ca006b6b9556490431664d3de6f24999 # Parent b936a1aab4dc7807a9ec832004d5b98a46d66e05 Make sure form is not submitted when using typeahead. diff -r b936a1aab4dc -r 380450f0ca00 src_js/iconolab-bundle/src/components/tagform/TagListItem.vue --- a/src_js/iconolab-bundle/src/components/tagform/TagListItem.vue Mon Feb 27 18:19:32 2017 +0100 +++ b/src_js/iconolab-bundle/src/components/tagform/TagListItem.vue Mon Feb 27 19:08:52 2017 +0100 @@ -4,15 +4,15 @@ {{ label }}
- +
- +
- +
diff -r b936a1aab4dc -r 380450f0ca00 src_js/iconolab-bundle/src/components/tagform/Typeahead.vue --- a/src_js/iconolab-bundle/src/components/tagform/Typeahead.vue Mon Feb 27 18:19:32 2017 +0100 +++ b/src_js/iconolab-bundle/src/components/tagform/Typeahead.vue Mon Feb 27 19:08:52 2017 +0100 @@ -6,6 +6,7 @@ v-bind:placeholder="placeholder" autocomplete="off" v-model="query" + @keypress.enter="preventSubmit" @keydown.down="down" @keydown.up="up" @keydown.enter="hit($event)" @@ -163,6 +164,10 @@ if (!selected) { return; } this.$emit('selected', selected); this.reset(); + }, + preventSubmit(e) { + e.preventDefault(); + e.stopPropagation(); } }