Repository navigation
fix(range): allow clicking the last tick to select the max value - #31652
Open
RaphaelFakhri wants to merge 1 commit into
Open
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
|
@RaphaelFakhri 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?
ion-rangehandles clicks and taps on the slider track, and the tick marks setpointer-events: none. The last tick is drawn at the end of the track, so the part of it that sticks out past the track (half the tick iniosmode, all of it inmdmode) passes the click to whatever is behind the range. Clicking that part of the last tick does nothing. Widening the ticks with::part(tick)makes this easy to hit.What is the new behavior?
iosandmdmodes. Ticks are inside the slider element, so a click on any tick reaches the range gesture, and a click on the last tick selects the max value.mdmode, the knob handle setsz-index: 2so it stays above the ticks (z-index: 1). Without this, pressing the center of the knob hits the tick under it, and the knob handle no longer receives focus.ionChangeemits the max value in both modes.Does this introduce a breaking change?
Other information
mainin both modes (noionChangeis emitted) and passes with this change.basic,label,statesanditemproduce identical results with and without themdknob handlez-indexchange.