Skip to content

Commit

Permalink
prevent scroll event before interaction (#1236)
Browse files Browse the repository at this point in the history
* prevent scroll event before interaction

* remove log
  • Loading branch information
IzaacAyelin committed May 19, 2024
1 parent 0b186c0 commit 7875da5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,10 @@ export class GalleryContainer extends React.Component {
}
if (eventName === GALLERY_CONSTS.events.CURRENT_ITEM_CHANGED) {
this.setCurrentSlideshowViewIdx(eventData.idx);
if (this.getIsScrollLessGallery(this.state.options)) {
if (
this.getIsScrollLessGallery(this.state.options) &&
this.state.firstUserInteractionExecuted
) {
this.simulateHorizontalScrollToItem(
this.galleryStructure.items[eventData.idx]
);
Expand Down

0 comments on commit 7875da5

Please sign in to comment.