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

Fixes #876
This commit is contained in:
Eric Liu 2021-12-30 08:58:49 -08:00
commit 8b6d617d75

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 />