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

Dragging to scroll clears selection #4951

Closed
m-sasha opened this issue Jun 10, 2024 · 1 comment
Closed

Dragging to scroll clears selection #4951

m-sasha opened this issue Jun 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working ios selection

Comments

@m-sasha
Copy link
Member

m-sasha commented Jun 10, 2024

On iOS (or other platforms with touch), the current selection is cleared on touch-up in SelectionContainer after dragging to scroll.

Affected platforms

  • iOS
  • (probably) Web when used with touch.

Versions

  • Compose Multiplatform version: 1.6.11

To Reproduce

  1. Run the mpp demo on iOS.
  2. In the SelectionContainer demo, in the scrollable text, select some text
  3. Drag the scrollable. Note that on touch-up, the selection is cleared.

Expected behavior
Selection should not be cleared.

Screenshots
https://github.com/JetBrains/compose-multiplatform/assets/5230206/e41a45cc-0f42-480a-8420-5fb2230b99b0

Additional context
The selection is cleared by SelectionManager.Modifier.onClearSelectionRequested, because the scroll is not recognized as a drag, so basically it thinks it was a click (because the pointer didn't move relative to the element).

@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios selection
Projects
None yet
Development

No branches or pull requests

4 participants