Skip to content

EditText box in TLHC handles resize and offset changes poorly #139230

@delfme

Description

@delfme

Is there an existing issue for this?

Steps to reproduce

Filing this issue coz comments are disabled on the original one: #112712
We thought we found a way to use TLHC as a substitute for HC when wrapping a native textfield.
The solution suggested by @johnmccutchan (see here #112712 (comment))
indeed resolves the issue related to Magnifier lense, but a new issue originated as a consequence of that fix.

Basically, due to that override, the surface gets rendered with some delay and the platform view bumps when its position is changed (in our case the inputted text bumps when a new line is added).

Please do not discontinue HC as long as a fix for this is found. We've no alternative to it and we've also invested serious money/time on this.

Expected results

We would love to use TLHC but texture-rendering must be as smooth as with HC in the above described scenario.

Actual results

Platform View bumps when its position is changed on the scene.

Code sample

Code available here:
https://github.com/delfme/flutter-native-text-input-repo

The plugin uses TLHC and issue is reproducible
https://github.com/collinjackson/flutter-native-text-input/blob/1ef42d30462d97a3fafc856e356af83e106fe6b6/lib/flutter_native_text_input.dart#L334

Fork the plugin and change TLHC to HC to see that no issue occurs with HC.

Screenshots or Video

Smooth with HC
https://github.com/flutter/flutter/assets/53510751/90728c72-cd6f-425a-a418-d2708fa5a02e

Bumping with TLHC:
note: this is a low res recording, issue is way more visible on the device.
https://github.com/flutter/flutter/assets/53510751/a43183d9-6656-42d1-a845-955502838ef8

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.17.0-17.0.pre.25, on macOS 12.6.5 21G531 darwin-arm64, locale en-IT)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Connected device (3 available)
[✓] Network resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsa: text inputEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.found in release: 3.16Found to occur in 3.16found in release: 3.17Found to occur in 3.17has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyplatform-views: tlhcIssues specific to the Android Texture Layer Hybrid Composition platform views backendteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions