Fixed
Status Update
Comments
je...@google.com <je...@google.com>
ma...@google.com <ma...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug: b/161809385
Bug: b/161807956
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
https://android-review.googlesource.com/1394868
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug:
Bug:
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
2g...@gmail.com <2g...@gmail.com> #3
I am facing the same issue.
When I scroll and my finger happens to be over the ExposedDropdownMenuBox, the dropdown opens as soon as I lift my finger (so it is on the up-event, I guess).
However, It seems to me that only clicks should be considered and not all pointer-events. After all, the logic for differentiating between scrolling and clicking is already there, right? The onClick listeners (buttons, clickable, etc.) don't fire when my finger happens to be over them when I scroll.
When I scroll and my finger happens to be over the ExposedDropdownMenuBox, the dropdown opens as soon as I lift my finger (so it is on the up-event, I guess).
However, It seems to me that only clicks should be considered and not all pointer-events. After all, the logic for differentiating between scrolling and clicking is already there, right? The onClick listeners (buttons, clickable, etc.) don't fire when my finger happens to be over them when I scroll.
po...@google.com <po...@google.com>
ed...@gmail.com <ed...@gmail.com> #4
This makes ExposedDropdownMenuBox
pretty much unusable.
ed...@gmail.com <ed...@gmail.com> #5
The workaround I went for is:
Box(modifier = Modifier.fillMaxWidth().height(IntrinsicSize.Max)) {
ExposedDropdownMenuBox(expanded = expanded, onExpandedChange = {
//Do nothing
}) {
...
}
Box(Modifier.fillMaxSize().clickable { expanded = !expanded })
Basically add a working clickable section on top of the broken one. Works good enough for me.
br...@gmail.com <br...@gmail.com> #6
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 059c7f3c39ad8a0abe5bb10d04a65967cfd7ebc8
Author: Max Alfonso-Ying <maxying@google.com>
Date: Tue Oct 25 01:01:58 2022
Fix ExposedDropdownMenu opening while scrolling
Fixes: b/212091796
Test: new tests in ExposedDropdownMenuTest
Relnote: "`awaitFirstDown` and `waitForUpOrCancellation` now
accept a PointerEventPass for greater flexibility."
Change-Id: I7579a2dbb44c748a3fd3e515d2e7ab086aaff443
M compose/foundation/foundation/api/current.ignore
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.ignore
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/TapGestureDetector.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ExposedDropdownMenuTest.kt
M compose/material/material/src/androidMain/kotlin/androidx/compose/material/ExposedDropdownMenu.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ExposedDropdownMenuTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.kt
https://android-review.googlesource.com/2268066
Branch: androidx-main
commit 059c7f3c39ad8a0abe5bb10d04a65967cfd7ebc8
Author: Max Alfonso-Ying <maxying@google.com>
Date: Tue Oct 25 01:01:58 2022
Fix ExposedDropdownMenu opening while scrolling
Fixes:
Test: new tests in ExposedDropdownMenuTest
Relnote: "`awaitFirstDown` and `waitForUpOrCancellation` now
accept a PointerEventPass for greater flexibility."
Change-Id: I7579a2dbb44c748a3fd3e515d2e7ab086aaff443
M compose/foundation/foundation/api/current.ignore
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.ignore
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/TapGestureDetector.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ExposedDropdownMenuTest.kt
M compose/material/material/src/androidMain/kotlin/androidx/compose/material/ExposedDropdownMenu.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ExposedDropdownMenuTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.kt
na...@google.com <na...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.4.0-alpha02
androidx.compose.material:material:1.4.0-alpha02
androidx.compose.material3:material3:1.1.0-alpha02
Description
Jetpack Compose release version: 1.1.0-rc01
Android Studio Build: 2020.3.1 Patch 4
Kotlin version: 203-1.6.10-release-923-AS7717.8
When you want to scroll the screen the menu is displayed if you tap the component. The attached GIF shows the problem.
To reproduce, just run the code below.
ExposedDropdownMenuSample was taken from the official samples herehttps://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/material/material/samples/src/main/java/androidx/compose/material/samples/ExposedDropdownMenuSamples.kt .