Skip to content

Commit

Permalink
Merge pull request #15 from TedDriggs/remove-scroll-listener
Browse files Browse the repository at this point in the history
Remove scroll event listener in removeListeners
  • Loading branch information
xobotyi authored Oct 20, 2018
2 parents 32550b6 + 2aeb875 commit 581ce0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,9 @@ export default class Scrollbar extends React.Component
removeListeners = () => {
if (!isset(document) || !this.content) { return this; }

const {trackVertical, trackHorizontal, thumbVertical, thumbHorizontal} = this;
const {content, trackVertical, trackHorizontal, thumbVertical, thumbHorizontal} = this;

content.removeEventListener("scroll", this.handleScrollEvent, { passive: true });
trackVertical.removeEventListener("mousedown", this.handleTrackVerticalMousedownEvent);
trackHorizontal.removeEventListener("mousedown", this.handleTrackHorizontalMousedownEvent);
thumbVertical.removeEventListener("mousedown", this.handleThumbVerticalMousedownEvent);
Expand Down

0 comments on commit 581ce0d

Please sign in to comment.