Skip to content

Commit

Permalink
act the same loggic if hover on mocile
Browse files Browse the repository at this point in the history
  • Loading branch information
liatv committed Apr 25, 2024
1 parent 69d4db6 commit 05d2d28
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/gallery/src/components/item/itemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ class ItemView extends React.Component {
e.preventDefault();
}

if (this.shouldShowHoverOnMobile() || this.shouldShowSecondMediaOnMobile()) {
this.handleHoverClickOnMobile(e);
} else if (
utils.isMobile() &&
this.props.options[optionsMap.behaviourParams.item.video.playTrigger] ===
GALLERY_CONSTS[optionsMap.behaviourParams.item.video.playTrigger].HOVER
if (
this.shouldShowHoverOnMobile() ||
this.shouldShowSecondMediaOnMobile() ||
(utils.isMobile() &&
this.props.options[optionsMap.behaviourParams.item.video.playTrigger] ===
GALLERY_CONSTS[optionsMap.behaviourParams.item.video.playTrigger].HOVER)
) {
this.props.actions.eventsListener(GALLERY_CONSTS.events.HOVER_SET, this.props.idx);
this.handleHoverClickOnMobile(e);
} else {
this.handleGalleryItemAction(e);
}
Expand Down

0 comments on commit 05d2d28

Please sign in to comment.