Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Pager scroll with scrollable content on top #1098

Merged
merged 4 commits into from Feb 15, 2024

Conversation

ASalavei
Copy link
Collaborator

Fixes scrolling when the content scrolls in the same direction as its parent Pager node.

Related MR: #1097
Related Issue: JetBrains/compose-multiplatform#4279

@@ -953,6 +953,9 @@ internal class DefaultFlingBehavior(
lastAnimationCycleCount++
}
} catch (exception: CancellationException) {
// This is where the ScrollCancellationException should be caught,
// but the parent class CancellationException is caught here for
// backwards compatibility.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "backwards compatibility" here? What cases it covers? Aren't all references in the same module and already updated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, we keep handling CancellationException here to catch new potential cases. For example if someone will make similar trick at another place.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we should keep it for that. I hope this will be upstreamed soon to avoid such changes during the merge.
However, I'm not going to block the PR because of this.

cc @igordmn

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to create upstream PR in the close future, let's change. Otherwise it's safer to keep as it is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's planned for the next milestone

@ASalavei ASalavei merged commit adabe82 into jb-main Feb 15, 2024
6 checks passed
@ASalavei ASalavei deleted the andrei.salavei/fix-pager-scroll branch February 15, 2024 15:21
igordmn pushed a commit that referenced this pull request Mar 4, 2024
Fixes scrolling when the content scrolls in the same direction as its
parent Pager node.
@ASalavei ASalavei added the changelog1.6.1 Temporary label for 1.6.1 changelog (will be removed) label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog1.6.1 Temporary label for 1.6.1 changelog (will be removed) changes in common
Projects
None yet
2 participants