Skip to content

Commit

Permalink
fix(ripple): z-index adjusted (#2853)
Browse files Browse the repository at this point in the history
* fix(ripple): z-index adjusted

* fix(ripple): z-index changed
  • Loading branch information
jrgarciadev committed Apr 24, 2024
1 parent e9fef9b commit 765c04e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-panthers-relax.md
@@ -0,0 +1,5 @@
---
"@nextui-org/ripple": patch
---

Fix press event on iOS, the ripple zIndex was preventing the press event
4 changes: 3 additions & 1 deletion packages/components/ripple/src/ripple.tsx
Expand Up @@ -36,7 +36,9 @@ const Ripple: FC<RippleProps> = (props) => {
borderRadius: "100%",
transformOrigin: "center",
pointerEvents: "none",
zIndex: 10,
overflow: "hidden",
inset: 0,
zIndex: 0,
top: ripple.y,
left: ripple.x,
width: `${ripple.size}px`,
Expand Down
4 changes: 2 additions & 2 deletions packages/components/ripple/src/use-ripple.ts
Expand Up @@ -24,8 +24,8 @@ export function useRipple(props: UseRippleProps = {}) {
{
key: getUniqueID(prevRipples.length.toString()),
size,
x: event.clientX - rect.x - size / 2,
y: event.clientY - rect.y - size / 2,
x: event.clientX - rect.left - size / 2,
y: event.clientY - rect.top - size / 2,
},
]);
}, []);
Expand Down

0 comments on commit 765c04e

Please sign in to comment.