Commit 61f0f2a
fix(slider): value not being rounded when using keyboard and decimal step (#11574)
When incrementing a slider using the keyboard, the value can end up looking like
33.300000000000004, if the consumer set a decimal step. We fixed this a while ago for dragging, but that didn't cover the keyboard interactions. These changes move the logic from the earlier fix so it can apply everywhere.
Relates to #10951.1 parent 555d8f4 commit 61f0f2a
2 files changed
+22
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
493 | 504 | | |
494 | 505 | | |
495 | 506 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
228 | 236 | | |
229 | 237 | | |
230 | 238 | | |
| |||
638 | 646 | | |
639 | 647 | | |
640 | 648 | | |
641 | | - | |
| 649 | + | |
642 | 650 | | |
643 | 651 | | |
644 | 652 | | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
| 653 | + | |
652 | 654 | | |
653 | 655 | | |
654 | 656 | | |
| |||
0 commit comments