Skip to content

Commit 65b3241

Browse files
yangchristinaAaronCCWong
authored andcommitted
fix safari scroll #120
Revert "fix safari scroll #120" This reverts commit 8c0096b. add zIndex to back
1 parent 72de968 commit 65b3241

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ReactCardFlip.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
1717
flipSpeedBackToFront,
1818
infinite,
1919
isFlipped,
20-
} = {
20+
} = {
2121
cardStyles: {
2222
back: {},
2323
front: {},
@@ -31,7 +31,7 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
3131
isFlipped: false,
3232
...props
3333
}
34-
34+
3535
const [isFlippedState, setFlipped] = useState(isFlipped);
3636
const [rotation, setRotation] = useState(0);
3737

@@ -84,6 +84,7 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
8484
transformStyle: 'preserve-3d',
8585
transition: `${flipSpeedFrontToBack}s`,
8686
width: '100%',
87+
zIndex: isFlipped ? '2' : '1',
8788
...back,
8889
},
8990
container: {

0 commit comments

Comments
 (0)