Skip to content

fix(slider): update value on mousedown instead of click - #13020

Merged
josephperrott merged 1 commit into
angular:masterfrom
crisbeto:slider-mousedown
Oct 19, 2018
Merged

fix(slider): update value on mousedown instead of click#13020
josephperrott merged 1 commit into
angular:masterfrom
crisbeto:slider-mousedown

Conversation

@crisbeto

Copy link
Copy Markdown
Member

Currently the slider updates its value on the click event or when the user drags for at least one pixel. This looks weird, because the thumb label shows up as soon as the user puts down their pointer, but the value updates only if they lift it or they start dragging. There will always be a value update, because the user can't move their pointer outside the element without either lifting it or triggering the drag event.

Furthermore, the native input type="range" updates its value on mousedown as well and doing so makes the slider feel snappier.

Currently the slider updates its value on the `click` event or when the user drags for at least one pixel. This looks weird, because the thumb label shows up as soon as the user puts down their pointer, but the value updates only if they lift it or they start dragging. There will always be a value update, because the user can't move their pointer outside the element without either lifting it or triggering the drag event.
Furthermore, the native `input type="range"` updates its value on `mousedown` as well and doing so makes the slider feel snappier.
@crisbetocrisbeto added the target: patch This PR is targeted for the next patch release label Sep 7, 2018
@googlebotgooglebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 7, 2018
@mmalerba

Copy link
Copy Markdown
Contributor

This would probably have to be a major change since it affects the timing of events in a way that's likely to break tests and maybe even actual code

@mmalerbammalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Sep 7, 2018
@crisbetocrisbeto added target: patch This PR is targeted for the next patch release and removed target: major This PR is targeted for the next major release labels Oct 18, 2018
@josephperrott
josephperrott merged commit 861642c into angular:masterOct 19, 2018
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-botangular-automatic-lock-botBot locked and limited conversation to collaborators Sep 9, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: mergeThe PR is ready for merge by the caretakercla: yesPR author has agreed to Google's Contributor License Agreementtarget: patchThis PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@crisbeto@mmalerba@googlebot@josephperrott