Skip to content

Commit 0b5a928

Browse files
committed
fix: error in c-select when keypress event has no key
1 parent 6298215 commit 0b5a928

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
# 6.0.2
2+
- Fix error in c-select when keypress event has no key.
3+
14
# 6.0.1
2-
* `createAspNetCoreHmrPlugin` now displays NPM package mismatches with the standard vite overlay instead of a custom overlay.
3-
* `coalesce-mcp` now handles comments in `coalesce.json` files.
5+
- `createAspNetCoreHmrPlugin` now displays NPM package mismatches with the standard vite overlay instead of a custom overlay.
6+
- `coalesce-mcp` now handles comments in `coalesce.json` files.
47

58
# 6.0.0
69

src/coalesce-vue-vuetify3/src/components/input/c-select.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,13 +1139,14 @@ function onMenuContentBlur(event: FocusEvent): void {
11391139
/** When a key is pressed on the top level input */
11401140
function onInputKey(event: KeyboardEvent): void {
11411141
if (!isInteractive.value) return;
1142+
const key = event.key?.toLowerCase();
11421143
11431144
const input = mainInputRef.value;
11441145
const selectionStart = input?.selectionStart;
11451146
const value = internalModelValue.value;
11461147
const length = value.length;
11471148
1148-
switch (event.key.toLowerCase()) {
1149+
switch (key) {
11491150
case "delete":
11501151
case "backspace":
11511152
if (!menuOpen.value) {
@@ -1164,7 +1165,7 @@ function onInputKey(event: KeyboardEvent): void {
11641165
? length - 2
11651166
: originalSelectionIndex;
11661167
}
1167-
} else if (event.key.toLowerCase() === "backspace") {
1168+
} else if (key === "backspace") {
11681169
selectionIndex.value = length - 1;
11691170
}
11701171
} else {

0 commit comments

Comments
 (0)