We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61835dd commit 18d8ec4Copy full SHA for 18d8ec4
packages/coreui-vue/src/components/dropdown/CDropdownMenu.ts
@@ -37,14 +37,16 @@ const CDropdownMenu = defineComponent({
37
return classNames
38
}
39
40
- const handleKeyup = (event: Event) => {
+ const handleKeyup = (event: KeyboardEvent) => {
41
if (autoClose === false) {
42
return
43
44
- if (!dropdownMenuRef.value?.contains(event.target as HTMLElement)) {
+
45
+ if (event.key === 'Escape') {
46
hideMenu()
47
48
49
50
const handleMouseUp = (event: Event) => {
51
if (dropdownToggleRef.value?.contains(event.target as HTMLElement)) {
52
0 commit comments