Skip to content

Commit

Permalink
Don't fire change and set events in tap when using snap behaviour (#1106
Browse files Browse the repository at this point in the history
)
  • Loading branch information
leongersen committed Aug 14, 2021
1 parent 73ec3d0 commit c2fc112
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/nouislider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2213,10 +2213,11 @@ function scope(target: TargetElement, options: ParsedOptions, originalOptions: O

fireEvent("slide", handleNumber, true);
fireEvent("update", handleNumber, true);
fireEvent("change", handleNumber, true);
fireEvent("set", handleNumber, true);

if (options.events.snap) {
if (!options.events.snap) {
fireEvent("change", handleNumber, true);
fireEvent("set", handleNumber, true);
} else {
eventStart(event, { handleNumbers: [handleNumber] });
}
}
Expand Down

0 comments on commit c2fc112

Please sign in to comment.