Skip to content

Commit f37a197

Browse files
committed
fix: update keypress event to keydown
1 parent 19276ed commit f37a197

10 files changed

Lines changed: 44 additions & 48 deletions

dist/vue-multiselect.common.js

Lines changed: 11 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-multiselect.common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-multiselect.esm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ const _hoisted_2 = {
11651165
};
11661166
const _hoisted_3 = { class: "multiselect__tags-wrap" };
11671167
const _hoisted_4 = ["textContent"];
1168-
const _hoisted_5 = ["onKeypress", "onMousedown"];
1168+
const _hoisted_5 = ["onKeydown", "onMousedown"];
11691169
const _hoisted_6 = ["textContent"];
11701170
const _hoisted_7 = { class: "multiselect__spinner" };
11711171
const _hoisted_8 = ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-label", "aria-controls"];
@@ -1186,9 +1186,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
11861186
onBlur: _cache[15] || (_cache[15] = $event => (_ctx.searchable ? false : _ctx.deactivate())),
11871187
onKeydown: [
11881188
_cache[16] || (_cache[16] = withKeys(withModifiers($event => (_ctx.pointerForward()), ["self","prevent"]), ["down"])),
1189-
_cache[17] || (_cache[17] = withKeys(withModifiers($event => (_ctx.pointerBackward()), ["self","prevent"]), ["up"]))
1189+
_cache[17] || (_cache[17] = withKeys(withModifiers($event => (_ctx.pointerBackward()), ["self","prevent"]), ["up"])),
1190+
_cache[18] || (_cache[18] = withKeys(withModifiers($event => (_ctx.addPointerElement($event)), ["stop","self"]), ["enter","tab"]))
11901191
],
1191-
onKeypress: _cache[18] || (_cache[18] = withKeys(withModifiers($event => (_ctx.addPointerElement($event)), ["stop","self"]), ["enter","tab"])),
11921192
onKeyup: _cache[19] || (_cache[19] = withKeys($event => (_ctx.deactivate()), ["esc"])),
11931193
role: "combobox",
11941194
"aria-expanded": _ctx.isOpen,
@@ -1226,7 +1226,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
12261226
}, null, 8 /* PROPS */, _hoisted_4),
12271227
createElementVNode("i", {
12281228
tabindex: "1",
1229-
onKeypress: withKeys(withModifiers($event => (_ctx.removeElement(option)), ["prevent"]), ["enter"]),
1229+
onKeydown: withKeys(withModifiers($event => (_ctx.removeElement(option)), ["prevent"]), ["enter"]),
12301230
onMousedown: withModifiers($event => (_ctx.removeElement(option)), ["prevent"]),
12311231
class: "multiselect__tag-icon"
12321232
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5)
@@ -1278,9 +1278,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
12781278
onKeydown: [
12791279
_cache[6] || (_cache[6] = withKeys(withModifiers($event => (_ctx.pointerForward()), ["prevent"]), ["down"])),
12801280
_cache[7] || (_cache[7] = withKeys(withModifiers($event => (_ctx.pointerBackward()), ["prevent"]), ["up"])),
1281+
_cache[8] || (_cache[8] = withKeys(withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
12811282
_cache[9] || (_cache[9] = withKeys(withModifiers($event => (_ctx.removeLastElement()), ["stop"]), ["delete"]))
12821283
],
1283-
onKeypress: _cache[8] || (_cache[8] = withKeys(withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
12841284
class: "multiselect__input",
12851285
"aria-controls": 'listbox-'+_ctx.id
12861286
}, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_8))

dist/vue-multiselect.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ var VueMultiselect = (function (exports, vue) {
11661166
};
11671167
const _hoisted_3 = { class: "multiselect__tags-wrap" };
11681168
const _hoisted_4 = ["textContent"];
1169-
const _hoisted_5 = ["onKeypress", "onMousedown"];
1169+
const _hoisted_5 = ["onKeydown", "onMousedown"];
11701170
const _hoisted_6 = ["textContent"];
11711171
const _hoisted_7 = { class: "multiselect__spinner" };
11721172
const _hoisted_8 = ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-label", "aria-controls"];
@@ -1187,9 +1187,9 @@ var VueMultiselect = (function (exports, vue) {
11871187
onBlur: _cache[15] || (_cache[15] = $event => (_ctx.searchable ? false : _ctx.deactivate())),
11881188
onKeydown: [
11891189
_cache[16] || (_cache[16] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerForward()), ["self","prevent"]), ["down"])),
1190-
_cache[17] || (_cache[17] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerBackward()), ["self","prevent"]), ["up"]))
1190+
_cache[17] || (_cache[17] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerBackward()), ["self","prevent"]), ["up"])),
1191+
_cache[18] || (_cache[18] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["stop","self"]), ["enter","tab"]))
11911192
],
1192-
onKeypress: _cache[18] || (_cache[18] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["stop","self"]), ["enter","tab"])),
11931193
onKeyup: _cache[19] || (_cache[19] = vue.withKeys($event => (_ctx.deactivate()), ["esc"])),
11941194
role: "combobox",
11951195
"aria-expanded": _ctx.isOpen,
@@ -1227,7 +1227,7 @@ var VueMultiselect = (function (exports, vue) {
12271227
}, null, 8 /* PROPS */, _hoisted_4),
12281228
vue.createElementVNode("i", {
12291229
tabindex: "1",
1230-
onKeypress: vue.withKeys(vue.withModifiers($event => (_ctx.removeElement(option)), ["prevent"]), ["enter"]),
1230+
onKeydown: vue.withKeys(vue.withModifiers($event => (_ctx.removeElement(option)), ["prevent"]), ["enter"]),
12311231
onMousedown: vue.withModifiers($event => (_ctx.removeElement(option)), ["prevent"]),
12321232
class: "multiselect__tag-icon"
12331233
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5)
@@ -1279,9 +1279,9 @@ var VueMultiselect = (function (exports, vue) {
12791279
onKeydown: [
12801280
_cache[6] || (_cache[6] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerForward()), ["prevent"]), ["down"])),
12811281
_cache[7] || (_cache[7] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerBackward()), ["prevent"]), ["up"])),
1282+
_cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
12821283
_cache[9] || (_cache[9] = vue.withKeys(vue.withModifiers($event => (_ctx.removeLastElement()), ["stop"]), ["delete"]))
12831284
],
1284-
onKeypress: _cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
12851285
class: "multiselect__input",
12861286
"aria-controls": 'listbox-'+_ctx.id
12871287
}, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_8))

dist/vue-multiselect.ssr.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ const _hoisted_2 = {
11691169
};
11701170
const _hoisted_3 = { class: "multiselect__tags-wrap" };
11711171
const _hoisted_4 = ["textContent"];
1172-
const _hoisted_5 = ["onKeypress", "onMousedown"];
1172+
const _hoisted_5 = ["onKeydown", "onMousedown"];
11731173
const _hoisted_6 = ["textContent"];
11741174
const _hoisted_7 = { class: "multiselect__spinner" };
11751175
const _hoisted_8 = ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-label", "aria-controls"];
@@ -1190,9 +1190,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
11901190
onBlur: _cache[15] || (_cache[15] = $event => (_ctx.searchable ? false : _ctx.deactivate())),
11911191
onKeydown: [
11921192
_cache[16] || (_cache[16] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerForward()), ["self","prevent"]), ["down"])),
1193-
_cache[17] || (_cache[17] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerBackward()), ["self","prevent"]), ["up"]))
1193+
_cache[17] || (_cache[17] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerBackward()), ["self","prevent"]), ["up"])),
1194+
_cache[18] || (_cache[18] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["stop","self"]), ["enter","tab"]))
11941195
],
1195-
onKeypress: _cache[18] || (_cache[18] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["stop","self"]), ["enter","tab"])),
11961196
onKeyup: _cache[19] || (_cache[19] = vue.withKeys($event => (_ctx.deactivate()), ["esc"])),
11971197
role: "combobox",
11981198
"aria-expanded": _ctx.isOpen,
@@ -1230,7 +1230,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
12301230
}, null, 8 /* PROPS */, _hoisted_4),
12311231
vue.createElementVNode("i", {
12321232
tabindex: "1",
1233-
onKeypress: vue.withKeys(vue.withModifiers($event => (_ctx.removeElement(option)), ["prevent"]), ["enter"]),
1233+
onKeydown: vue.withKeys(vue.withModifiers($event => (_ctx.removeElement(option)), ["prevent"]), ["enter"]),
12341234
onMousedown: vue.withModifiers($event => (_ctx.removeElement(option)), ["prevent"]),
12351235
class: "multiselect__tag-icon"
12361236
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5)
@@ -1282,9 +1282,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
12821282
onKeydown: [
12831283
_cache[6] || (_cache[6] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerForward()), ["prevent"]), ["down"])),
12841284
_cache[7] || (_cache[7] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerBackward()), ["prevent"]), ["up"])),
1285+
_cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
12851286
_cache[9] || (_cache[9] = vue.withKeys(vue.withModifiers($event => (_ctx.removeLastElement()), ["stop"]), ["delete"]))
12861287
],
1287-
onKeypress: _cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
12881288
class: "multiselect__input",
12891289
"aria-controls": 'listbox-'+_ctx.id
12901290
}, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_8))

0 commit comments

Comments
 (0)