Status Update
Comments
an...@google.com <an...@google.com>
sh...@google.com <sh...@google.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.
la...@gmail.com <la...@gmail.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.
la...@gmail.com <la...@gmail.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.
so...@google.com <so...@google.com>
mo...@google.com <mo...@google.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
mo...@google.com <mo...@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.
la...@gmail.com <la...@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.
mo...@google.com <mo...@google.com> #8
Yes, this fix is planned to be included in a future 1.7.x
release.
tc...@google.com <tc...@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.
mo...@google.com <mo...@google.com> #10
I've tested this with alpha-10 and it appears to be working, so I will close this as Obsolete.
mo...@google.com <mo...@google.com> #11
Realized that it isn't obsolete as much as fixed, so used fixed instead.
la...@gmail.com <la...@gmail.com> #12
Unfortunately, this is still not fixed in the latest attached BubbleCompose.zip. Android Studio 2020.3.1 Canary 4 Jetpack Compose 1.0.0-alpha-10 Android Emulator Revision 3, API 30
mo...@google.com <mo...@google.com> #13
I'm trying this on physical hardware and not seeing any issues. I'll try the emulator.
mo...@google.com <mo...@google.com> #14
I am able to reproduce this on the emulator.
mo...@google.com <mo...@google.com> #15
This is the same bug as another that we've seen elsewhere. The global position of the window is not being updated when it is needed.
tc...@google.com <tc...@google.com> #16
ap...@google.com <ap...@google.com> #17
Branch: androidx-main
commit f1cab8853ca8a98c99f5c475f15e445965134d60
Author: George Mount <mount@google.com>
Date: Fri Jan 22 23:38:32 2021
Change pointer input dependency on screen position.
Bug: 169874631
Bug: 175142755
Bug: 168920689
Bug: 169438847
* Changed hit testing so that it works relative to its
position rather than the global position. This
removes the walk-up for every modifier in the hit
test path.
* Removed all dependencies on global LayoutCoordinates
methods and removed those methods.
* Fixed problem where an AndroidComposeView that itself
was transformed could have its input mangled. For
example, if the AndroidComposeView was rotated, then
pointer input would previously only recognize the
offset and not the rotation, so pointer input would
be wrong about its position.
* Wrote a test to verify transforms to/from window
coordinates.
* Added tests to verify the coordinates in window are correct when view moved/rotated or window is moved
Relnote: Removed deprecated LayoutCoordinates methods, use function instead of the property for positionInParent and boundsInParent
Test: new tests. Ran all android pointer input tests.
Change-Id: I580edba74283600c3aafba6130a7af806df7d6c5
M compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/AlignmentLineTest.kt
M compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/BoxTest.kt
M compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/RowColumnTest.kt
M compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/SizeTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/SelectionContainerFocusTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextSelectionColorsScreenshotTest.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextFieldDelegateTest.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/selection/MockCoordinates.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/BottomSheetScaffoldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/MaterialTextSelectionColorsScreenshotTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/AndroidAssertions.android.kt
M compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/AndroidInputDispatcher.android.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Actions.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/GestureScope.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Output.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/autofill/ExplicitAutofillTypesDemo.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AccessibilityIteratorsTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidAccessibilityTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/AndroidPointerInputTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/HitPathTrackerTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/MotionEventAdapterTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInteropFilterTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/OnGloballyPositionedTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/node/ModelReadsTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/window/PopupDismissTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/input/pointer/MotionEventAdapter.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AccessibilityIterators.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/HitPathTracker.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/InternalPointerInput.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/PointerEvent.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessor.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutCoordinates.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DelegatingLayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/InnerPlaceable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/PointerInputDelegatingWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsNode.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/input/pointer/PointerInputEvent.desktop.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.desktop.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwners.desktop.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
an...@google.com <an...@google.com>
la...@gmail.com <la...@gmail.com> #18
Hi,
What is the target release for this fix? After upgrading to the latest versions, I can still repro the issue (please cf. the newly attached BubbleCompose.zip).
Android Studio 2020.3.1 Canary 8 Jetpack Compose 1.0.0-beta01 Android Emulator 30.5.0, API 30
la...@gmail.com <la...@gmail.com> #20
Hi, I can still repro the issue with the Feb 25 BubbleCompose.zip, after upgrading to Android Studio 2020.3.1 Canary 10, Jetpack Compose 1.0.0-beta02, Android Emulator 30.5.2, API 30
mo...@google.com <mo...@google.com> #21
I'm able to reproduce this with the Feb 25 BubbleCompose.zip
mo...@google.com <mo...@google.com> #22
The source of the bug appears to be that getLocationOnScreen()
is returning (0, 0)
for the window containing the bubble contents. I think I'll have to work around the bug.
ap...@google.com <ap...@google.com> #23
Branch: androidx-main
commit 03b281a865ebeba81087864dbccc4476ec071dc4
Author: George Mount <mount@google.com>
Date: Fri Apr 02 23:53:03 2021
Fix problem with pointer input having a bad position.
Fixes: 169874631
In some circumstances, getLocationOnScreen() can return an invalid
result during pointer input dispatching. This CL uses the motion
event's raw position and position in the view to determine the
window position. It also calculates the view matrix once and caches
it so that it won't have to be calculated multiple times during
pointer input dispatch.
Test: ran breaking application.
Change-Id: Ic99fc8b4628b92d79f76da6e46363cebbd95ee4f
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/AndroidPointerInputTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/input/pointer/MotionEventAdapter.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
ap...@google.com <ap...@google.com> #24
Branch: androidx-main
commit 991ec6d090dfc0c088803dfa972e9570e6dbd577
Author: George Mount <mount@google.com>
Date: Wed Apr 14 17:51:56 2021
Fix problem with window having a scroll position.
Fixes: 169804790
Bug: 169874631
It turns out that the problem with
in getLocationOnScreen(), but just that the window had a scrolled
content. This CL fixes the problem by properly retrieving the
position, including the scroll position of the window.
Also changed cache check to use animation time instead of
drawing time because the view may not draw on every frame
that can have the position changed.
Test: new tests, bubble test, text handles demo
Change-Id: Id907e4dc5d134debc9260fff8c09ced9e7a7a754
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/window/PositionInWindowTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
la...@gmail.com <la...@gmail.com> #25
Unfortunately this issue is still not fixed in the BubbleCompose.zip project after bumping to the latest versions.
Compose 1.0.0-beta08 androidx.activity:activity-compose:1.3.0-beta01
mo...@google.com <mo...@google.com> #26
How does this keep not being fixed?!!?
mo...@google.com <mo...@google.com> #27
I verified that this is broken again. I think that every time I fix this, something else is broken and it gets changed again. It is difficult to get unit tests to identify this particular problem.
mo...@google.com <mo...@google.com> #28
It appears that the fix in getLocationOnScreen()
for the AndroidComposeView
, I'm seeing (0, 0), which is incorrect. This is not a problem with scroll position as getLocationOnScreen()
should be considering this.
I'll restore the fix for #23 to see if that fixes the issue (again).
ap...@google.com <ap...@google.com> #29
Branch: androidx-main
commit 9a9f6ab21c3f71bc2b20261ecb824bbd34472014
Author: George Mount <mount@google.com>
Date: Wed Jun 16 18:25:04 2021
Use MotionEvent for window position during touch events
Fixes: 169874631
In some special circumstances getLocationOnScreen() does
not properly retrieve the position. We can compensate for
it by using the MotionEvent raw coordinates in comparison
with their positions to determine the real window position.
Test: new test, manual testing using BubbleCompose
Change-Id: I2a19717f0e602b88f5445541fdf59ca82b1aa474
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/AndroidPointerInputTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
la...@gmail.com <la...@gmail.com> #30
Confirmed fixed in Compose 1.0.0-rc01. Thank you!
Description
Jetpack Compose release version: 1.0.0-alpha03
Android Studio Build: 4.2 Canary 12
Steps to Reproduce:
Expected: The button with label "Button 0" gets the touch events.
It looks like there is a missing coordinating adjustment when a Compose view is shown in a bubble.