Skip to content

Commit

Permalink
trigger hover when without overlay and no action ON MOBILE
Browse files Browse the repository at this point in the history
  • Loading branch information
liatv committed Apr 25, 2024
1 parent 2eb461b commit 0ec84b8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/gallery/src/components/item/itemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class ItemView extends React.Component {
this.onBlur = this.onBlur.bind(this);
this.checkIfCurrentHoverChanged =
this.checkIfCurrentHoverChanged.bind(this);
this.shouldHoverWithoutOverlayAndClickOnMobile = this.shouldHoverWithoutOverlayAndClickOnMobile.bind(this);

Check failure on line 76 in packages/gallery/src/components/item/itemView.js

View workflow job for this annotation

GitHub Actions / lint (16.13.0)

Insert `⏎·····`
}

//----------------------------------------| ACTIONS |-------------------------------------------//
Expand Down Expand Up @@ -204,6 +205,11 @@ class ItemView extends React.Component {
this.shouldShowSecondMediaOnMobile()
) {
setTimeout(this.handleHoverClickOnMobile(e), 0);
} else if (this.shouldHoverWithoutOverlayAndClickOnMobile()) {
this.props.actions.eventsListener(
GALLERY_CONSTS.events.HOVER_SET,
this.props.idx
);
} else {
this.handleGalleryItemAction(e);
}
Expand Down Expand Up @@ -323,6 +329,16 @@ class ItemView extends React.Component {
return false;
}


Check failure on line 332 in packages/gallery/src/components/item/itemView.js

View workflow job for this annotation

GitHub Actions / lint (16.13.0)

Delete `⏎`
shouldHoverWithoutOverlayAndClickOnMobile() {
return (
utils.isMobile() &&
this.props.options.behaviourParams.item.video.playTrigger ===
GALLERY_CONSTS.videoPlay.HOVER &&

Check failure on line 337 in packages/gallery/src/components/item/itemView.js

View workflow job for this annotation

GitHub Actions / lint (16.13.0)

Insert `··`
this.props.options.itemClick === GALLERY_CONSTS.itemClick.NOTHING

Check failure on line 338 in packages/gallery/src/components/item/itemView.js

View workflow job for this annotation

GitHub Actions / lint (16.13.0)

Delete `·`
);
}

isHighlight() {
return (
this.props.thumbnailHighlightId &&
Expand Down

0 comments on commit 0ec84b8

Please sign in to comment.