flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

Keyboard pops up doesn't trigger resize event on window.VisualViewport

Open qkreltms opened this issue 1 month ago • 1 comments

  • [x] I have read the Getting Started section
  • [x] I have already searched for the same problem

Environment

Technology Version
Flutter version 3.19.6
Plugin version 6.0.0
Android version 12
iOS version
macOS version
Xcode version
Google Chrome version

Device information: Galaxy A90 5G

Description

If I select input tag in webview should keyboard pops up and triggers resize event on window.visualViewport, but it doesn't trigger resize event at all when set resizeToAvoidBottomInset: false in Android device.

If I tried it in just Chrome browser without webview it triggers resize event on visualViewport.

  const onResize = (event) => {
    console.log('resize');
  };

  window.visualViewport.addEventListener('resize', onResize);

`Expected behavior: Keyboard pops up should trigger resize event and visualViewport.height changed

Current behavior:

Steps to reproduce

  1. Go any url which has input tag like: example

const Scaffold(
            resizeToAvoidBottomInset: false,
            body: InAppWebView(
                initialUrlRequest: [your link here],)));

  1. type visualViewport on chrome console and check height before triggering keyboard
  2. type visualViewport on chrome console and check height after triggering keyboard

Images

image

Stacktrace/Logcat

qkreltms avatar May 10 '24 06:05 qkreltms