Skip to content

Slider: Pass 0 value if slider reaches it #1540

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

Closed
wants to merge 2 commits into from
Closed

Slider: Pass 0 value if slider reaches it #1540

wants to merge 2 commits into from

Conversation

atomiomi
Copy link
Contributor

If changed value is equal to zero then the last changed value is passed to ui object. This is due to checking in _uiHash method which defines whether the new value was passed or not.

Test link: https://jsfiddle.net/Lhqryk47/

  1. Drag the handle on the right side
  2. Value must be between 1 and 100
  3. Now drag the handle on the minimum value (zero)
  4. Passed value will be 1 or greater it depends on drag speed

value type conversion was replaced by strict check
handle: this.handles[ index ],
handleIndex: index,
value: typeof value !== "undefined" ? value : this.value()
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo this indent change, on this line and the three above.

Indents in `_uiHash` method were removed
@atomiomi
Copy link
Contributor Author

Indents are corrected.

@jzaefferer
Copy link
Member

Looks good. I'll let @scottgonzalez review and merge.

@scottgonzalez
Copy link
Member

Thanks. Filed the bug as http://bugs.jqueryui.com/ticket/12196, replaced typeof value !== "undefined" with value !== undefined for consistency, and merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants