Status Update
Comments
ya...@gmail.com <ya...@gmail.com> #2
First of all thanks for this detailed issue.
This issue had been investigated thoroughly when it was first reported internally. The surprising detail in this report is that the issue is not reproducible before 1.7
. I will look into this.
The main problem with POBox is the fact that it is deprecated. Since 2021 Sony has been shipping new Xperia devices with Gboard pre-installed. Although we are aware that there is still a considerable amount of users still using POBox, the described behavior is caused by POBox's noncompliant behavior with InputConnection
and InputMethodManager
documentation. However, this is understandable since TextView
implementation was also not respecting the behavior that is expected from Editors.
Ultimately we have decided to enforce the documented behavior with specifically regards to when editors should call InputMethodManager.updateSelection
. Also, although unconfirmed, there were traces of possible custom code being included in Sony OEM images that changed how InputMethodManager was notified from TextView. If POBox also depended on something like this, it would be impossible for Compose code to replicate the same unknown behavior.
an...@google.com <an...@google.com>
so...@google.com <so...@google.com> #3
Or is that option not available?
Even if the root cause is POBox, from the perspective of the app's customers, it looks like an app bug, so this issue is a blocker against updating Jetpack Compose.
ha...@google.com <ha...@google.com> #4
Just to be sure, it is dangerous to replace Compose TextField with Android View EditText as a workaround for this issue.
Compose 1.7 has a bug that causes ANR when the focus is on EditText.
Another View-related bug in Compose 1.7 is that an Android View is focused by calling FocusManager.clearFocus().
Perhaps there is a lack of testing of Compose 1.7 in combination with Android View. There is also a possibility that there are other fatal bugs related to View.
In other words, the only options for apps targeting the Japanese market that require POBox support are to continue using Compose 1.6 or to use EditText in combination with various workarounds.
ya...@gmail.com <ya...@gmail.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Halil Ozercan <
Link:
Fix POBox keyboard issue
Expand for full commit details
Fix POBox keyboard issue
Fix: 373743376
Fix: 329209241
Test: NullableInputConnectionWrapperTest
Change-Id: I94e0e598274fb88b255f977f9fbd50dfbbb1ecb1
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapperTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapper.android.kt
Hash: 57f58c4b80d5d8470b2aca325dfdcd55f235231e
Date: Thu Oct 24 01:25:20 2024
so...@google.com <so...@google.com> #6
Many thanks again for this report. Especially for giving us a huge clue in terms of what could be going wrong. The fix is now merged and I will ask for a cherry-pick into a stable release.
ya...@gmail.com <ya...@gmail.com> #7
Do you have any concrete plan to cherry-pick the fix into current stable version (1.7.x)? We are currently waiting it.
ha...@google.com <ha...@google.com> #8
Yes, this fix is planned to be included in a future 1.7.x
release.
ha...@google.com <ha...@google.com>
ap...@google.com <ap...@google.com> #9
Thanks for the fix. Sorry to follow up on this. is it possible for you to share specific release version/date for the stable version? We are waiting on this to decide on our direction.
ha...@google.com <ha...@google.com>
ya...@gmail.com <ya...@gmail.com> #10
ya...@gmail.com <ya...@gmail.com> #11
I just checked again on beta09 and it's still here. I couldn't reproduce it on an emulator but it happens on my real device only the first time the keyboard opens (app must be force closed).
Also when the keyboard does not fully cover the TextField, it still has inconsistent placement as I just reported on issue #191286850 before knowing the main bug is still here. (The attached files show the issue)
so...@google.com <so...@google.com>
si...@google.com <si...@google.com> #12
soboleva@
Did you try this on the latest build? Haoyu merged the change in Jun 15, we reopened in Jun17 based on beta09. Is the change in beta09?
ha...@google.com <ha...@google.com> #13
Hi, thanks for the updates!
IIRC the change is after beta-09 cut and will come with beta-10.
Meanwhile, the consistency issue mentioned may not be fixed by the CL above.
The possible course of the
so...@google.com <so...@google.com> #14
Not sure what is consistency issue. But I tested today on tip of androidx-main
branch and the issue described in the ticket is still reproduced 100% times.
Tested on device with API 30.
ya...@gmail.com <ya...@gmail.com> #15
I just updated my app to 1.0.0-rc1 and the issue is still happening. The input field isn't visible sometimes.
ha...@google.com <ha...@google.com>
se...@google.com <se...@google.com>
se...@google.com <se...@google.com>
ya...@gmail.com <ya...@gmail.com> #16
kl...@google.com <kl...@google.com> #17
I can reproduce using the demo app on the latest main branch, but as mentioned above it only happens the first time a text field is focused after launching the app, subsequent focuses move the text field into view as expected, and only on some API versions (24, not 30).
kl...@google.com <kl...@google.com> #18
If you're still seeing this bug, is your window's soft input mode ADJUST_RESIZE
or ADJUST_PAN
?
co...@protonmail.com <co...@protonmail.com> #19
I have activity soft input mode set to adjustResize as per accompanist insets lib:
ap...@google.com <ap...@google.com> #20
Branch: androidx-main
commit 22f05f8acfc4a9dfd93a00c537708f26ae8dbe4e
Author: Zach Klippenstein <klippenstein@google.com>
Date: Tue Feb 01 12:27:01 2022
Set focused child before granting it focus.
Fixes a bug where if an onFocusEvent searched for the active FocusModifier
it would crash because the newly-focused child hadn't been set on the
parent modifier yet.
Also cleaned up some code comments in related files – scout rule!
Bug:
Bug:
Test: ./gradlew :compose:ui:ui:cDAT
Change-Id: I1ba0a3411cb3793099b12913a25a8b0d92f74c40
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/focus/FindFocusableChildrenTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/focus/FocusTestUtils.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusTransactions.kt
ap...@google.com <ap...@google.com> #21
Branch: androidx-main
commit 314a8bd718c5c905444bc538c6d04e3a4805d848
Author: Zach Klippenstein <klippenstein@google.com>
Date: Wed Feb 02 09:54:40 2022
Fix a bunch of flaky tests caused by performing focus operations off the UI thread.
Bug:
Bug:
Test: Tests are fixed.
Change-Id: I15ee7001a1128486939c273434ef28a41d84ed79
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/focus/TwoDimensionalFocusTraversalThreeItemsTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/focus/TwoDimensionalFocusTraversalTwoItemsTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/focus/CustomFocusTraversalTest.kt
ap...@google.com <ap...@google.com> #22
Branch: androidx-main
commit 1237c1570308c6a5ad043702f5e9051c1c874602
Author: Zach Klippenstein <klippenstein@google.com>
Date: Thu Jan 27 19:41:29 2022
Report AndroidComposeView's focus rect to the view system.
ViewRootImpl controls panning when the keyboard is shown and the window
is configured to pan instead of resize. When it does this, it finds the
focused view and calls getFocusedRect to find the area to keep above the
keyboard. Because Compose has its own internal focus, it needs to report
that to the view system by overriding getFocusedRect in order to be
moved when the keyboard is shown.
I also factored out the keyboard helper methods from
CoreTextFieldSoftKeyboardTest so I could use them for the scrollable
tests.
Bug:
Bug:
Test: ./gradlew :compose:f:f:cDAT
Relnote: "TextFields will now be kept above the keyboard when they are
focused and the keyboard is shown, when the soft input mode is
`ADJUST_RESIZE`."
Change-Id: I8eaebb684b7828dcf92b0678a86d796b49b349c8
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/CoreTextFieldSoftKeyboardTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/CoreTextFieldKeyboardScrollableInteractionTest.kt
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextFieldsInScrollableDemo.kt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/focus/FocusViewInteropTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/KeyboardHelper.kt
ap...@google.com <ap...@google.com> #23
Branch: androidx-main
commit 0de2359ab6335c7680e54cdd7b7bae046df9cdae
Author: Zach Klippenstein <klippenstein@google.com>
Date: Tue Feb 22 18:59:29 2022
Update TextFieldsInScrollableDemo to enable toggling setDecorFitsSystemWindows.
Bug:
Bug:
Bug:
Test: manual, since this is just a demo change.
Change-Id: I94deb16188232d8fe2d87b97b27dd3b7f2d36f68
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextFieldsInScrollableDemo.kt
ap...@google.com <ap...@google.com> #24
Branch: androidx-main
commit 30ab5ff0d1840570f5628d9489b47ce118caa4a3
Author: Zach Klippenstein <klippenstein@google.com>
Date: Sat Jan 29 09:36:44 2022
Introduce onFocusBoundsChanged.
Design doc:
Note that this feature does not currently work with AndroidView (
that needs to be wired up in the ui module but this API is needed to fix
an issue in foundation, and I want to leave it as Experimental for now,
and we don't allow cross-module experimental access. When this modifier
is stabilized, it should be moved to UI, and that bug resolved.
Bug:
Bug:
Bug:
Test: Manual via FocusedChildDemo
Test: ./gradlew :compose:f:f:cDAT
Relnote: "Introduced experimental `Modifier.onFocusedBoundsChanged` to allow
observing the bounds of child focusables."
Change-Id: I14283393b5273527ab65f4aa1a2d4383321b0d95
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Focusable.kt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_current.txt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/FocusedBounds.kt
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/FocusedBoundsDemo.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/FocusableBoundsTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/FoundationDemos.kt
ap...@google.com <ap...@google.com> #25
Branch: androidx-main
commit d9c6260e0ecaab7b33ecda95611d60e3184a0fa4
Author: Zach Klippenstein <klippenstein@google.com>
Date: Mon Jan 31 09:46:32 2022
Make scrollable keep focused view in view when resized.
This is part of the fix for these bugs, another other part is aosp/1964580.
This behavior still doesn't work as expected for lazy lists because the
focused item can be removed due to the resize before it has a chance to
be scrolled into view. Ralston's working on the necessary functionality
to fix this.
Design doc:
Bug:
Bug:
Fixes:
Test: ./gradlew :compose:f:f:cDAT
Relnote: "Scroll modifiers (`Modifier.verticalScroll()`,
`Modifier.horizontalScroll()`, and `Modifier.scrollable()`)
will now scroll to keep the focused composable visible if
the scroll area is resized and the focused composable was
previously visible."
Relnote: "TextFields will now be kept above the keyboard when they are
focused and the keyboard is shown, when inside a non-lazy
scrollable and the soft input mode is `ADJUST_RESIZE`."
Change-Id: I4a485a1c80aa2d500dcd55e916006903ff45da95
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableFocusableInteractionTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/FoundationDemos.kt
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/ScrollableFocusedChildDemo.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
kl...@google.com <kl...@google.com> #26
This is close enough to
Description
Android Studio Build:
Steps to Reproduce:
1. Put a TextField on the bottom of the screen
2. Tap on the TextField to open the keyboard
3. The keyboard will probably cover up the TextField and you won't be able to see it when typing
This bugged behavior is a little bit random but it mainly happens the FIRST time only. I have attached a gif of the bug happening on my app.
I have to also note that currently, I focus on the TextField automatically but this bug also happens when focusing on a TextField manually.