Skip to content

Commit 661aa10

Browse files
fix: scrolling on mobile on testimonial cards works again
1 parent 845bd9f commit 661aa10

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

components/Testimonials.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,15 @@
232232
pointer-events: none;
233233
}
234234

235-
/* Improve touch scrolling */
235+
/* I could not figure out why this breaks the masonry grid single column
236+
* scrolling on mobile. I think its because if we are using masonry layout then
237+
* we should have touch-action: pan-y.
236238
.sj-container > div > div {
237239
touch-action: pan-x;
238240
overscroll-behavior-x: contain;
241+
239242
}
243+
*/
240244

241245
/* Add scroll snap for better mobile experience */
242246
.sj-container > div > div {

components/Testimonials.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ const TestimonialsContainer: React.FC<{
215215
const getLayoutClasses = () => {
216216
switch (effectiveLayout) {
217217
case 'horizontal':
218-
return "flex gap-4 overflow-x-auto pb-2 items-start";
218+
return "flex gap-4 overflow-x-auto pb-2 items-start swiper-horizontal";
219219
case 'masonry':
220220
return "masonry-grid";
221221
default:

0 commit comments

Comments
 (0)