Small refactor of DoubleRangeSlider (fix ios slider)#83
Merged
BenHall-1 merged 4 commits intoTicketsBot-cloud:masterfrom Feb 2, 2026
Merged
Small refactor of DoubleRangeSlider (fix ios slider)#83BenHall-1 merged 4 commits intoTicketsBot-cloud:masterfrom
BenHall-1 merged 4 commits intoTicketsBot-cloud:masterfrom
Conversation
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.
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.
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
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.