Skip to content

Small refactor of DoubleRangeSlider (fix ios slider)#83

Merged
BenHall-1 merged 4 commits intoTicketsBot-cloud:masterfrom
biast12:fix-ios-slider
Feb 2, 2026
Merged

Small refactor of DoubleRangeSlider (fix ios slider)#83
BenHall-1 merged 4 commits intoTicketsBot-cloud:masterfrom
biast12:fix-ios-slider

Conversation

@biast12
Copy link
Copy Markdown
Contributor

@biast12 biast12 commented Feb 1, 2026

RM-212
Fixes touch/iOS issues with the DoubleRangeSlider by refactoring the movement logic to use absolute cursor positioning instead of relative movement deltas. This eliminates the offset drift that occurred when dragging outside the track bounds. Also increased the slider hit area with padding for easier touch targeting, disabled pointer events on labels to prevent them from blocking interaction, and adjusted positioning calculations to keep everything aligned.

Add `pointer-events: none` to the slider label style in DoubleRangeSlider.svelte so the label won't intercept mouse/touch events. This prevents the label from blocking thumb dragging or causing accidental selections while interacting with the range slider.
@biast12 biast12 requested a review from a team as a code owner February 1, 2026 20:01
Move the vertical offset (top: -8px) from .slider > div to the .slider container to consolidate positioning and correct the slider's vertical alignment; removes the duplicate top rule on the child element.
Refactor slider movement logic to compute positions from the track's bounding rect instead of relying on movementX or parsing CSS strings. Added a `line` ref (bind:this) and a shared `updateSliderPosition(clientX)` helper used by mouse and touch handlers; removed `previousTouch` and `parseOffset`. Offsets are now clamped to prevent sliders crossing and ratios are computed against a max offset, improving touch support and simplifying the code.
@biast12 biast12 changed the title Disable pointer events on slider labels Small refactor of DoubleRangeSlider (fix ios slider) Feb 1, 2026
Add a sliderPadding constant and adjust handle positioning to subtract that padding using calc(), preventing the thumbs from overflowing or misaligning. Also tweak the slider CSS (top offset and padding) so the visual position matches the new padding and spacing.
@BenHall-1 BenHall-1 merged commit 0dc1ee5 into TicketsBot-cloud:master Feb 2, 2026
@biast12 biast12 deleted the fix-ios-slider branch March 8, 2026 12:47
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.

2 participants