fix(date-picker): input should not lose focus when pressing "Enter" (#958)

Fixes #876
This commit is contained in:
Eric Liu 2021-12-30 13:00:11 -08:00 committed by GitHub
commit f955b09c09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -239,6 +239,14 @@
e.stopPropagation(); e.stopPropagation();
calendar.close(); calendar.close();
} }
if (
$hasCalendar &&
/INPUT/.test(document.activeElement?.tagName) &&
e.key === 'Enter'
) {
e.stopPropagation();
}
}}" }}"
> >
<slot /> <slot />