Skip to content

Commit 58ba804

Browse files
committed
fix(CDropdown): menu not closing on button click
1 parent 6824339 commit 58ba804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/coreui-react/src/components/dropdown/CDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ export const CDropdown: PolymorphicRefForwardingComponent<'div', CDropdownProps>
368368
}
369369

370370
const target = event.target as HTMLElement | null
371-
const FORM_TAG_RE = /^(input|select|option|textarea|form|button|label)$/i
371+
const FORM_TAG_RE = /^(input|select|option|textarea|form)$/i
372372

373373
if (isOnMenu && target && FORM_TAG_RE.test(target.tagName)) {
374374
return

0 commit comments

Comments
 (0)