Skip to content

Commit

Permalink
Placed reactNames of events from event listeners those React consider…
Browse files Browse the repository at this point in the history
… they are passive.
  • Loading branch information
MertTurel committed Jan 24, 2021
1 parent f373992 commit 89c36c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/innerSliderUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function clamp(number, lowerBound, upperBound) {
}

export const safePreventDefault = event => {
const passiveEvents = ["onTouchStart", "onTouchMove", "onTouchEnd"];
const passiveEvents = ["onTouchStart", "onTouchMove", "onWheel"];
if(!passiveEvents.includes(event._reactName)) {
event.preventDefault();
}
Expand Down

0 comments on commit 89c36c7

Please sign in to comment.