diff --git a/.changeset/slimy-ways-repair.md b/.changeset/slimy-ways-repair.md new file mode 100644 index 0000000000..c0e164cd26 --- /dev/null +++ b/.changeset/slimy-ways-repair.md @@ -0,0 +1,6 @@ +--- +"@nextui-org/accordion": patch +"@nextui-org/tabs": patch +--- + +Fix 'Tap to click' behavior on macOS for Accordion and Tab diff --git a/packages/components/accordion/src/use-accordion-item.ts b/packages/components/accordion/src/use-accordion-item.ts index ec4f85ef09..1b1322ba29 100644 --- a/packages/components/accordion/src/use-accordion-item.ts +++ b/packages/components/accordion/src/use-accordion-item.ts @@ -169,8 +169,9 @@ export function useAccordionItem(props: UseAccordionItemP otherProps.onBlur, item.props?.onBlur, ), - ...mergeProps(buttonProps, hoverProps, pressProps, props), - onClick: chain(pressProps.onClick, onClick), + ...mergeProps(buttonProps, hoverProps, pressProps, props, { + onClick: chain(pressProps.onClick, onClick), + }), }; }; diff --git a/packages/components/tabs/src/tab.tsx b/packages/components/tabs/src/tab.tsx index 3f3da0974b..6c68507f50 100644 --- a/packages/components/tabs/src/tab.tsx +++ b/packages/components/tabs/src/tab.tsx @@ -111,11 +111,11 @@ const Tab = forwardRef<"button", TabItemProps>((props, ref) => { enabled: shouldFilterDOMProps, omitPropNames: new Set(["title"]), }), + {onClick: handleClick}, )} className={slots.tab?.({class: tabStyles})} title={otherProps?.titleValue} type={Component === "button" ? "button" : undefined} - onClick={handleClick} > {isSelected && !disableAnimation && !disableCursorAnimation && isMounted ? (