Fix auto-scroll to new photo on mobile

This commit is contained in:
2026-04-22 11:32:37 +04:00
parent 4fed8c05c5
commit c853418fbb
3 changed files with 11 additions and 6 deletions

View File

@@ -38,10 +38,7 @@ export default class PlacePhotosCarousel extends Component {
`[data-event-id="${eventId}"]`
);
if (targetSlide) {
element.scrollTo({
left: targetSlide.offsetLeft,
behavior: 'smooth',
});
element.scrollLeft = targetSlide.offsetLeft;
}
}, 100);
}