Skip to content

Commit c52ad85

Browse files
authored
Merge pull request #14942 from guardian/doml/fix-safari-carousels
Fix scroll issue on mobile iOS carousels
2 parents ed02afd + 134486e commit c52ad85

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

dotcom-rendering/src/components/SlideshowCarousel.importable.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const carouselItemStyles = css`
5656
scroll-snap-align: start;
5757
`;
5858

59-
const carouselLinkStyles = css`
59+
const containerStyles = css`
6060
position: relative;
6161
z-index: ${getZIndex('card-nested-link')};
6262
`;
@@ -80,8 +80,6 @@ const navigationStyles = (hasBackgroundColour: boolean) => css`
8080
display: flex;
8181
align-items: center;
8282
padding-top: ${space[2]}px;
83-
position: relative;
84-
z-index: ${getZIndex('card-nested-link')};
8583
8684
${until.tablet} {
8785
background-color: ${hasBackgroundColour
@@ -214,10 +212,9 @@ export const SlideshowCarousel = ({
214212
const slideshowImageCount = slideshowImages.length;
215213

216214
return (
217-
<>
215+
<div css={containerStyles}>
218216
<a
219217
href={linkTo}
220-
css={carouselLinkStyles}
221218
aria-label={linkAriaLabel}
222219
data-link-name={dataLinkName}
223220
>
@@ -302,6 +299,6 @@ export const SlideshowCarousel = ({
302299
</div>
303300
</div>
304301
)}
305-
</>
302+
</div>
306303
);
307304
};

0 commit comments

Comments
 (0)