Skip to content

Commit 2aeb875

Browse files
committed
Remove scroll event listener in removeListeners
Fixes #14
1 parent 9e9993e commit 2aeb875

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ export default class Scrollbar extends React.Component
336336
removeListeners = () => {
337337
if (!isset(document) || !this.content) { return this; }
338338

339-
const {trackVertical, trackHorizontal, thumbVertical, thumbHorizontal} = this;
339+
const {content, trackVertical, trackHorizontal, thumbVertical, thumbHorizontal} = this;
340340

341+
content.removeEventListener("scroll", this.handleScrollEvent, { passive: true });
341342
trackVertical.removeEventListener("mousedown", this.handleTrackVerticalMousedownEvent);
342343
trackHorizontal.removeEventListener("mousedown", this.handleTrackHorizontalMousedownEvent);
343344
thumbVertical.removeEventListener("mousedown", this.handleThumbVerticalMousedownEvent);

0 commit comments

Comments
 (0)