Fixed
Status Update
Comments
jo...@google.com <jo...@google.com>
jr...@google.com <jr...@google.com> #2
Hi, any update on this issues?
mo...@google.com <mo...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 58377bb3416cc24d342dd4e5d32e4a27247734e4
Author: Ralston Da Silva <ralu@google.com>
Date: Tue Aug 13 14:09:35 2024
Fix bug in focus interop search
When focus moves between Views and Compose, it should navigate
by going from one to the next. Previously, it was possible for
focus to disappear or for the wrong item to be selected when
changing between View and Compose focusable items.
Bug: 350534714
Test: new tests, manual test
Change-Id: If5e1b4133f7ffe674678f75de10dc65b145cd6d6
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusTestUtils.kt
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/FocusSearchDownInteropTest.kt
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/FocusSearchUpInteropTest.kt
A compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/ViewParentFocusSearchTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/focus/FocusInteropUtils.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/TwoDimensionalFocusSearch.kt
https://android-review.googlesource.com/3217068
Branch: androidx-main
commit 58377bb3416cc24d342dd4e5d32e4a27247734e4
Author: Ralston Da Silva <ralu@google.com>
Date: Tue Aug 13 14:09:35 2024
Fix bug in focus interop search
When focus moves between Views and Compose, it should navigate
by going from one to the next. Previously, it was possible for
focus to disappear or for the wrong item to be selected when
changing between View and Compose focusable items.
Bug: 350534714
Test: new tests, manual test
Change-Id: If5e1b4133f7ffe674678f75de10dc65b145cd6d6
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusTestUtils.kt
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/FocusSearchDownInteropTest.kt
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/FocusSearchUpInteropTest.kt
A compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/ViewParentFocusSearchTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/focus/FocusInteropUtils.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/TwoDimensionalFocusSearch.kt
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 8fe096651225b6655f903e678bd7978a18463728
Author: George Mount <mount@google.com>
Date: Fri Sep 13 09:20:29 2024
Don't do special handling for clearFocus on API 27 and below
Bug: 318968220
Fixes: 350534714
This reverts aosp/2928744 because it is causing problems when
focus first arrives into the ComposeView.
When the IME has a NEXT action from an external View, it
can arrive into the ComposeView's requestFocus() with
isInTouchMode = true. We can't distinguish this behavior
from the clearFocus() behavior that aosp/2928744 was
trying to fix.
Test: new test
Change-Id: I99d9d63c6007823dd7be203ce968496e6c0feb9e
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusManagerCompositionLocalTest.kt
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusTransactionsTest.kt
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/FocusSearchForwardInteropTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
https://android-review.googlesource.com/3267440
Branch: androidx-main
commit 8fe096651225b6655f903e678bd7978a18463728
Author: George Mount <mount@google.com>
Date: Fri Sep 13 09:20:29 2024
Don't do special handling for clearFocus on API 27 and below
Bug: 318968220
Fixes: 350534714
This reverts aosp/2928744 because it is causing problems when
focus first arrives into the ComposeView.
When the IME has a NEXT action from an external View, it
can arrive into the ComposeView's requestFocus() with
isInTouchMode = true. We can't distinguish this behavior
from the clearFocus() behavior that aosp/2928744 was
trying to fix.
Test: new test
Change-Id: I99d9d63c6007823dd7be203ce968496e6c0feb9e
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusManagerCompositionLocalTest.kt
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusTransactionsTest.kt
M compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/FocusSearchForwardInteropTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
na...@google.com <na...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.8.0-alpha02
androidx.compose.ui:ui-android:1.8.0-alpha02
androidx.compose.ui:ui-jvmstubs:1.8.0-alpha02
pr...@google.com <pr...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.7.3
androidx.compose.ui:ui-android:1.7.3
androidx.compose.ui:ui-jvmstubs:1.7.3
androidx.compose.ui:ui-linuxx64stubs:1.7.3
androidx.compose.ui:ui:1.8.0-alpha03
androidx.compose.ui:ui-android:1.8.0-alpha03
androidx.compose.ui:ui-jvmstubs:1.8.0-alpha03
androidx.compose.ui:ui-linuxx64stubs:1.8.0-alpha03
Description
Jetpack Compose component used: AndroidView() TextButton(),
Android Studio Build:
Android Studio Iguana | 2023.2.1 RC 2
Build #AI-232.10227.8.2321.11429013, built on February 8, 2024
Runtime version: 17.0.9+0-17.0.9b1087.7-11185874 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.5
GC: G1 Young Generation, G1 Old Generation
Memory: 5120M
Cores: 10
Metal Rendering is ON
Registry:
debugger.new.tool.window.layout=true
reasonable.application.thread.pool.size=256
ide.index.image.max.size=0
ide.experimental.ui=true
Kotlin version: Latest Kotlin version
Steps to Reproduce or Code Sample to Reproduce:
1. Built sample app provided in the bug
2. Using Dpad to focus on the last element under AndroidView - (BUTTON SIX)
3. Hit key Tab.
4. Now the focus is on some invisible element.
5. Hit key Tab again.
6. Focus is on the first TextButton (1 field).
Stack trace (if applicable):