compose-multiplatform
compose-multiplatform copied to clipboard
[Desktop] Mouse wheel-scrolling a JScrollPane stops when cursor is over a ComposePanel
Describe the bug
If you have a JScrollPane with a ComposePanel in it, and use the mouse wheel or trackpad to scroll the scrollpane, when the mouse cursor is over the ComposePanel, the JScrollPane doesn't scroll anymore.
It looks as if the ComposePanel were swallowing scroll events, even if its contents aren't scrollable.
Affected platforms
- Desktop (Windows, Linux, macOS)
Versions
- Kotlin version*: 1.9.23
- Compose Multiplatform version*: 1.6.10-dev1561
- OS version(s): macOS 14.4.1
- OS architecture (x86 or arm64): arm64
- JDK (for desktop issues): JBR 17 (latest)
To Reproduce
- Clone https://github.com/rock3r/cfd-repros/
- Run
NoScrollingOnComposePanel.kt - Try scrolling the
JScrollPaneand notice it stops when the mouse pointer is over aComposePanel
Expected behavior Scrolling should not stop
@MatkovIvan I just saw this happen on a webpage, too: https://www.composablesui.com/components/multiplatform/buttons
Chrome, Android 14 (@alexstyl mentioned it working on web on desktop for him)
https://github.com/JetBrains/compose-multiplatform/assets/153802/9d41fd2b-5042-4e25-b4ab-5fc3fe5369de
@rock3r I believe it's similar, but not the same - it should be handled in platform implementation with all of its specifics. Let's keep this issue for tracking the problem in swing panel implementation only
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.