mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(components): Fix 'Tap to click' behavior on macOS with Edge/Chrome for Accordion and Tab (#2725)
* fix(components): fix 'Tap to click' behavior on macOS * Add change file for accordion, menu, and tabs * Remove 'fix(components)' from the .changeset file * fix(components): undo dropdown change now that it's no longer applicable * fix(components): update changeset file now that we are no longer modifying the dropdown component
This commit is contained in:
parent
3b14c21e02
commit
8048dcc0c3
6
.changeset/slimy-ways-repair.md
Normal file
6
.changeset/slimy-ways-repair.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@nextui-org/accordion": patch
|
||||||
|
"@nextui-org/tabs": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix 'Tap to click' behavior on macOS for Accordion and Tab
|
||||||
@ -172,8 +172,9 @@ export function useAccordionItem<T extends object = {}>(props: UseAccordionItemP
|
|||||||
otherProps.onBlur,
|
otherProps.onBlur,
|
||||||
item.props?.onBlur,
|
item.props?.onBlur,
|
||||||
),
|
),
|
||||||
...mergeProps(buttonProps, hoverProps, pressProps, props),
|
...mergeProps(buttonProps, hoverProps, pressProps, props, {
|
||||||
onClick: chain(pressProps.onClick, onClick),
|
onClick: chain(pressProps.onClick, onClick),
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -111,11 +111,11 @@ const Tab = forwardRef<"button", TabItemProps>((props, ref) => {
|
|||||||
enabled: shouldFilterDOMProps,
|
enabled: shouldFilterDOMProps,
|
||||||
omitPropNames: new Set(["title"]),
|
omitPropNames: new Set(["title"]),
|
||||||
}),
|
}),
|
||||||
|
{onClick: handleClick},
|
||||||
)}
|
)}
|
||||||
className={slots.tab?.({class: tabStyles})}
|
className={slots.tab?.({class: tabStyles})}
|
||||||
title={otherProps?.titleValue}
|
title={otherProps?.titleValue}
|
||||||
type={Component === "button" ? "button" : undefined}
|
type={Component === "button" ? "button" : undefined}
|
||||||
onClick={handleClick}
|
|
||||||
>
|
>
|
||||||
{isSelected && !disableAnimation && !disableCursorAnimation && isMounted ? (
|
{isSelected && !disableAnimation && !disableCursorAnimation && isMounted ? (
|
||||||
<LazyMotion features={domMax}>
|
<LazyMotion features={domMax}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user