Skip to content

Commit

Permalink
fix scroll to first video on autoplay (#1184)
Browse files Browse the repository at this point in the history
* fix scroll to first video item on desktop

* cleaner condition
  • Loading branch information
noam-heller1 authored Feb 18, 2024
1 parent a111f0d commit f990e83
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class ScrollIndicator extends React.Component {
this.onHorizontalScroll = (e) => {
this.props.setGotFirstScrollIfNeeded();
const target = e.currentTarget || e.target || e;
let left = target && (target.scrollX || target.scrollLeft || target.x);
let left = target && (target.scrollX ?? target.scrollLeft ?? target.x);
if (this.props.isRTL) {
left = Math.abs(left); //this.props.totalWidth - left;
}
Expand Down

0 comments on commit f990e83

Please sign in to comment.