Skip to content

[webview_flutter] Keyboard behavior is buggy after a resize #36978

@mklim

Description

@mklim

I've uncovered a long tail of some issues as part of investigating #35867.

The first problem is where we restart the input connection on unlock. On some devices (it looks like SDK 24 devices, but I'm wary of there being more variables at play than just SDK version here) this resets the InputConnection to null instead of restarting it and getting the previous good connection like on the majority of devices.

I'm also seeing a bug on SDK 25 emulators where the input appears to reopen itself continually after a resize. Not sure if it reproduces on physical devices as well.

Deleting the code block "fixes" the issue completely. However that restart is there to prevent another issue on other devices where ViewRootImpl cancels text events with a noisyCancelling event due to no window focus log. So far I haven't been able to figure out how to set the correct window focus other than calling IMM#restartInput. Nothing related to setting the window focus on either the FlutterView or the WebView itself has seemed to have any effect.

Metadata

Metadata

Assignees

Labels

a: platform-viewsEmbedding Android/iOS views in Flutter appse: device-specificOnly manifests on certain devicesp: webviewThe WebView pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specifically

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions