Repository navigation
fix(range): allow clicking ticks that extend past the slider - #31655
Open
ShryukGrandhi wants to merge 1 commit into
Open
ShryukGrandhi wants to merge 1 commit into
ShryukGrandhi wants to merge 1 commit into
Conversation
Signed-off-by: ShryukGrandhi <[email protected]>
|
@ShryukGrandhi is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Issue number: resolves #30738
What is the current behavior?
Tick marks have
pointer-events: none, so clicks pass through them to whatever is underneath.ion-rangeonly listens for pointer events on.range-slider, and the last tick is positioned atleft: 100%, so the part of it that hangs past the end of the slider (half the tick inios, the whole tick inmd) doesn't hit the slider at all. Clicking it does nothing. This gets very noticeable once the ticks are widened with::part(tick).What is the new behavior?
pointer-events: nonefrom.range-tickin theiosandmdstyles. Ticks are children of.range-slider, so a pointer event on any part of a tick now bubbles to the slider and goes through the existing gesture/tap handling. The position is already clamped to the slider bounds, so clicking the overhanging part of the last tick selects the max value (same for the first tick and the min value).ionChangewith the max value.Does this introduce a breaking change?
Other information
This is the same thing as the workaround in the issue (
pointer-events: autoon the tick parts), just applied in the component.Testing (Mobile Chrome):
ionChangebefore the change in bothiosandmd, passes after.npx playwright test src/components/range --ignore-snapshots: everything passes except the 4a11ytests, which fail identically onmain(axepage-has-heading-one) and are unrelated.Fixes #30738