Skip to content

#15262: Round calculated max before compare with max from options. #1940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
#15262: Correct logic for cover tests.
  • Loading branch information
tkiseleva committed Dec 18, 2020
commit 204fcb1ce55f932f159dbefdc3fa3f07332920d0
2 changes: 1 addition & 1 deletion ui/widgets/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
var max = this.options.max,
min = this._valueMin(),
step = this.options.step,
aboveMin = Math.floor( ( max - min ) / step ) * step;
aboveMin = Math.round( ( max - min ) / step ) * step;
max = aboveMin + min;

// Round the max before compare with max from option.
Expand Down