Skip to content

Commit

Permalink
use set timeout on click events (#1194)
Browse files Browse the repository at this point in the history
* use set timeout on click events

* dummy

* Revert "dummy"

This reverts commit 288c80f.

* mobile
  • Loading branch information
IzaacAyelin committed Feb 29, 2024
1 parent f4a2857 commit 7a6028c
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -696,7 +696,14 @@ export class GalleryContainer extends React.Component {
}
}
if (typeof this.props.eventsListener === 'function') {
this.props.eventsListener(eventName, eventData, event);
switch (eventName) {
case GALLERY_CONSTS.events.ITEM_ACTION_TRIGGERED:
case GALLERY_CONSTS.events.ITEM_CLICKED:
setTimeout(this.props.eventsListener(eventName, eventData, event), 0);
break;
default:
this.props.eventsListener(eventName, eventData, event);
}
}

if (eventName === GALLERY_CONSTS.events.GALLERY_SCROLLED) {
Expand Down

0 comments on commit 7a6028c

Please sign in to comment.