Commit 93f8ffb
[Slider] Add mouse support for slider control.
This change makes it so that mouse input does not behave exactly like touch when using a slider. Previously, any time a touch event was detected on a slider bar, we would postpone updating the slider position because there was potential for a pan drag if the container was a scrollable view. See cl/286431744. However for mouse input this should never apply because a mouse down event should not be able to scroll the container.
This change also fixes the halo not updating when clicking or touching down on the slider (without dragging). This isn't very noticeable when only using touch input but when hovering over the control with a mouse, you can see the halo was in the last position of the slider instead of the current position.
PiperOrigin-RevId: 4959056451 parent af16b05 commit 93f8ffb
1 file changed
+11
-2
lines changedLines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1943 | 1943 | | |
1944 | 1944 | | |
1945 | 1945 | | |
1946 | | - | |
| 1946 | + | |
1947 | 1947 | | |
1948 | 1948 | | |
1949 | 1949 | | |
| |||
1964 | 1964 | | |
1965 | 1965 | | |
1966 | 1966 | | |
1967 | | - | |
| 1967 | + | |
1968 | 1968 | | |
1969 | 1969 | | |
1970 | 1970 | | |
| |||
1996 | 1996 | | |
1997 | 1997 | | |
1998 | 1998 | | |
| 1999 | + | |
1999 | 2000 | | |
2000 | 2001 | | |
2001 | 2002 | | |
| |||
2347 | 2348 | | |
2348 | 2349 | | |
2349 | 2350 | | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
2350 | 2359 | | |
2351 | 2360 | | |
2352 | 2361 | | |
| |||
0 commit comments