Skip to content

Fix slider finish values outside changed bounds - #360

Open
Xapollon430 wants to merge 1 commit into
dataarts:masterfrom
Xapollon430:codex/fix-slider-release-current-bounds
Open

Xapollon430 wants to merge 1 commit into
dataarts:masterfrom
Xapollon430:codex/fix-slider-release-current-bounds

Conversation

@Xapollon430

Copy link
Copy Markdown

A slider can finish outside its current bounds when min() or max() changes during a drag. For example, drag to 80, call max(60), and release. onFinishChange reports 80 and the bound object keeps that value.

Revalidate the stored value before mouse or touch completion. Apply bounds after step rounding so a maximum of 60 with step 7 cannot round back outside the range. Leave valid values unchanged.

Add matching QUnit regressions for mouse and touch release after minimum, maximum, and step-bound changes, plus valid-value controls.

Focused validation used actual source bundled into Chromium:

  • Six cases failed on the original source, reporting 80, 20, or 84 outside the changed bounds.
  • All eight cases pass after the fix, including both valid-value controls.
  • No page errors occurred.

The full legacy QUnit suite and Rollup build were not run. No dependencies or lockfiles change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant