fix(media): click-to-seek on position slider and volume slider in audio widget #1493#1539
Open
Mestane wants to merge 1 commit into
Open
fix(media): click-to-seek on position slider and volume slider in audio widget #1493#1539Mestane wants to merge 1 commit into
Mestane wants to merge 1 commit into
Conversation
Also the same case for volume slider in audio widget. |
Contributor
Author
Yes, this PR fixes both the same root cause applies to any Videorecording-20260609-143347.mp4 |
53594ad to
a56e74c
Compare
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.
Problem
Clicking directly on the media position slider had no effect — the playback position did not change. Only dragging worked.
In
StyledSlider.qml,onReleasedwas usingposBinding.valuewhich evaluates topressStartPos + dragMovement. SincedragMovementis only updated inonPositionChanged(which never fires on a click with no movement), it remained0on release — causing the interaction to emit the original position instead of the clicked position.Fix
In
onReleased, check whether any drag movement occurred. If not, calculate the position directly from the release event'sxcoordinate instead of relying onposBinding.Notes
This also resolves the snap-back issue described in #1485 for click interactions, as the correct position is now emitted on the first try.
Video
recording_20260609_13-50-55.mp4
fixed( nexus ):#1493