Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Smooth scroll doesn't work with Chrome

Manav Rathia5156db9672c
diff --git a/web/apps/photos/src/pages/index.tsx b/web/apps/photos/src/pages/index.tsx
index 382fe2e79c..944a0151b8 100644
--- a/web/apps/photos/src/pages/index.tsx
+++ b/web/apps/photos/src/pages/index.tsx
@@ -407,6 +407,12 @@ const SlidesContainer = styled("div")`
align-self: stretch;
display: flex;
overflow-x: hidden;
+ /* Note: smooth scroll doesn't work with Chrome intermittently. A common
+ workaround is to wrap the scrollTo in a setTimeout etc, but even that
+ doesn't help for our particular scenario.
+
+ Ref: https://github.com/facebook/react/issues/23396
+ */
scroll-behavior: smooth;
// scroll-snap-type: x mandatory;
`;