fix(components): [select-v2] allow propagation of non-control key events in custom options (#19984)

fix: allow propagation of non-control key events in custom options
This commit is contained in:
DDDDD12138 2025-02-27 22:09:14 +08:00 committed by GitHub
parent 16dbe32b0d
commit 87e3d1d400
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -227,7 +227,7 @@ export default defineComponent({
const onKeydown = (e: KeyboardEvent) => {
const { code } = e
const { tab, esc, down, up, enter, numpadEnter } = EVENT_CODE
if (code !== tab) {
if ([esc, down, up, enter, numpadEnter].includes(code)) {
e.preventDefault()
e.stopPropagation()
}