Skip to content

Commit

Permalink
Fixing overscroll on non-Firefox browsers...
Browse files Browse the repository at this point in the history
  • Loading branch information
LutherTS committed Oct 8, 2024
1 parent d728c58 commit 1b2029b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/(pages)/carousel-part-cleaned/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ export default function Carousel({
objectFitting === "scroll"
? objectFittingScrollHeight
: "auto",
// x: `-${index * 100}%`, // Safari again
}}
onAnimationStart={(definition: AnimationDefinition) =>
onStart(definition)
Expand Down Expand Up @@ -604,6 +605,8 @@ export default function Carousel({
<div
className={clsx(
"absolute inset-x-0 bottom-6 flex h-14 justify-center overflow-x-hidden",
// trying to address thumbnails not appearing on Safari...
// "absolute mb-6 flex h-14 justify-center overflow-hidden",
noDistracting !== "false" &&
noDistracting !== "imagesonly" &&
"hidden",
Expand Down
6 changes: 5 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html
lang="en"
// I literally need to have overscroll-none on the HTML for any browser other than Firefox (specifically Safari, Chrome and I think Edge) to respect my carousel.
className="overscroll-none"
>
<body className={`${geistSans.variable} ${geistMono.variable}`}>
{children}
</body>
Expand Down

0 comments on commit 1b2029b

Please sign in to comment.