Skip to content

Commit

Permalink
fix(esl-scrollbar): change target on window for scroll event
Browse files Browse the repository at this point in the history
  • Loading branch information
Natalie-Smirnova committed Nov 25, 2022
1 parent 6dfdfa6 commit 93a0560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/esl-scrollbar/core/esl-scrollbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class ESLScrollbar extends ESLBaseElement {
protected bindTargetEvents(): void {
if (!this.$target) return;
if (document.documentElement === this.$target) {
this.$$on(this._onScrollOrResize);
this.$$on({event: 'scroll', target: window}, this._onScrollOrResize);
} else {
this.$$on({event: 'scroll', target: this.$target}, this._onScrollOrResize);
this._resizeObserver.observe(this.$target);
Expand Down

0 comments on commit 93a0560

Please # to comment.