Fix a regression in scrolling when ComposeViewport is embedded in HTML scrollable container#3177
Open
Oleksandr Karpovich (eymar) wants to merge 6 commits into
Open
Fix a regression in scrolling when ComposeViewport is embedded in HTML scrollable container#3177Oleksandr Karpovich (eymar) wants to merge 6 commits into
Oleksandr Karpovich (eymar) wants to merge 6 commits into
Conversation
…implify internal logic in `RootScrollObserver`
…nal`: - Add `activeTouchPointersConsumedMoves` to track pointer moves consumed by Compose. - Update `RootScrollObserver` to track total scroll events and refine `consumedAnyScroll` logic. - Prevent browser override of touch gestures when no scrollable content is hit but some gestures are consumed by Compose. - Minor adjustment to pointer change consumption in `PointerInputDebugOverlay`.
| } | ||
|
|
||
| if (activeTouchPointers.isEmpty()) { | ||
| rootScrollObserver.reset() |
Member
There was a problem hiding this comment.
I would add here something like: require(activeTouchPointersConsumedMoves.isEmpty())
| override val viewConfiguration = | ||
| object : ViewConfiguration by PlatformContext.DefaultViewConfiguration { | ||
| override val touchSlop: Float get() = with(density) { 18.dp.toPx() } | ||
| override val touchSlop: Float get() = with(density) { 8.dp.toPx() } |
Member
There was a problem hiding this comment.
| installFallbackFontDownloader() | ||
| interopContainer.TrackInteropPlacementContainer { | ||
| content() | ||
| WithNestedScrollObserver(rootScrollObserver) { |
Member
There was a problem hiding this comment.
Could you explain how it is handled in android? (I mean a nested compose scollable into an android view scrollable)
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.
Fixes https://youtrack.jetbrains.com/issue/CMP-10351
Other changes:
Testing
Added 2 demos with embedded ComposeViewport.
The new demos available when passing an additional
demourl parameter:Since the regression affect mobile web browsers, it makes sense to test in mobile.
Release Notes
Fixes - Web