Skip to content

Commit

Permalink
settings.js: remove workaround (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored and jeromebon committed Nov 11, 2021
1 parent 1fdee2a commit 5c4d7f7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/js/page/ui/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default class Settings {
this.container.addEventListener('input', (event) =>
this._onChange(event),
);
scroller.addEventListener('wheel', (event) => this._onMouseWheel(event));
resetBtn.addEventListener('click', () => this._onReset());

// TODO: revisit this
Expand All @@ -49,16 +48,6 @@ export default class Settings {
});
}

_onMouseWheel(event) {
// Prevents bounce effect on desktop.
// Firefox uses pixels on a mouse wheel, ignore it
// 1 is "lines", 0 is "pixels"
if (event.deltaMode === 0) {
event.preventDefault();
event.currentTarget.scrollTop += event.deltaY;
}
}

_onChange(event) {
clearTimeout(this._throttleTimeout);

Expand Down

0 comments on commit 5c4d7f7

Please sign in to comment.