Closed fourlastor closed 1 month ago
And this works on Jetpack Compose, right?
Yep, works fine on Jetpack Compose 1.2.0 on Android
Just noticed that the scrollbars example works. The issue is only capturing mouse/touchpad events to scroll horizontally
I have the same problem :(
LazyRow also doesn't work correctly
In https://github.com/JetBrains/compose-jb/issues/2690 there was a small workaround described - use Shift with vertical scroll of wheel.
But we still need to support wheel left/right, if the rest of the system supports that.
Investigation.
Scroll isn't received by Swing (underlying framework):
import java.awt.Dimension
import javax.swing.JFrame
import javax.swing.SwingUtilities
fun main() {
SwingUtilities.invokeLater {
val j = JFrame()
j.addMouseWheelListener {
println("wheel")
}
j.size = Dimension(200, 200)
j.isVisible = true
}
}
Doesn't work on JBR 17, JDK 17. But it works in IDEA somehow. We should look at its sources.
If vertical scrolling works, surely the events are received, no?
When we scroll vertically - we receive events. When horizontally - we don't receive.
@igordmn I think we're talking about different things.
I think you're talking about physical horizontal scrolling, like a horizontal scroll-wheel?
I'm talking about vertical scroll events causing horizontal scrolling in the UI.
Not sure what the original bug reporter meant.
i'm wondering when this issue is going to fix
@mbunderline76
i'm wondering when this issue is going to fix
Based on other issues and priorities, we want to postpone fix of current issue.
@mbunderline76
i'm wondering when this issue is going to fix
This is a problem for me when using a trackpad, i.e. scrolling with two fingers left and right. I should not have to hold down shift for compose to receive horizontal scroll events.
I did an investigation and still can't receive horizontal scroll events (without pressing shift). I checked out intellij community source code, I even tried jetbrains runtime (21) but the scroll events are still not received! Also tried the --add-opens java.desktop/javax.swing.plaf.basic=ALL-UNNAMED
but nothing works...
This is a huge problem for my app as well because it is 2d canvas based. Do you have any updates on this @igordmn? Thanks in advance
@igordmn same problem here, users (i include myself here) would expect scrolling without having to shift to work. Is there any workaround so that it works? The expected behaviour should be like the tabs row in intellj idea. Thanks to all the team btw! (its also not working on windows)
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
The following code snippet (100 boxes that should scroll horizontally) doesn't respond to mouse/touchpad scrolling:
Vertical scrolling (a
Column
with.verticalScroll(rememberScrollState())
) works correctly (it scrolls when using a scrollwheel/touchpad)JVM: Temurin 17.0.4 Compose version: 1.2.0 Kotlin version: 1.7.10 OS info: