Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
- Use
InAppWebView
withresizeToAvoidBottomInset: true
. - An input field Inside a web drawer.
- Tap the input field on an iOS device (e.g., iPhone 14, iOS 18).
- Observe the content shift.
Expected Behavior
Content adjusts to stay visible above the keyboard
Steps with code example to reproduce
Steps with code example to reproduce
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: true, // keyboard
body: ColorfulSafeArea(
color: AppColors.statusBarColor,
child: InlineWebview(
webviewKey,
AppSettings.appUrl,
AppSettings.appTitle,
),
),
);
}
......
InAppWebViewSettings webViewSettings = InAppWebViewSettings(
useShouldOverrideUrlLoading: true,
mediaPlaybackRequiresUserGesture: false,
useHybridComposition: true,
allowsInlineMediaPlayback: true,
// allow http
mixedContentMode: MixedContentMode.MIXED_CONTENT_ALWAYS_ALLOW,
allowFileAccessFromFileURLs: true,
allowUniversalAccessFromFileURLs: true,
allowFileAccess: true,
allowContentAccess: true,
// viewport
enableViewportScale: true,
// keyboard
contentInsetAdjustmentBehavior:
ScrollViewContentInsetAdjustmentBehavior.AUTOMATIC,
// for google auth
userAgent: AppSettings.userAgentApp,
javaScriptEnabled: true,
useOnLoadResource: true,
cacheEnabled: kDebugMode ? false : true,
applicationNameForUserAgent: AppSettings.appName,
disableDefaultErrorPage: true,
sharedCookiesEnabled: true,
supportMultipleWindows: true,
// allow debug
isInspectable: true,
);
......
InAppWebView(
key: webViewKey,
initialUrlRequest: URLRequest(url: WebUri(widget.url)),
initialSettings: webViewSettings,
Stacktrace/Logs
Stacktrace/Logs
<Replace this line by pasting your stacktrace or logs here>
Flutter version
Flutter 3.29.2 • channel stable
Operating System, Device-specific and/or Tool
iOS 18.3.2
Plugin version
v6.0.0, v6.1.5, v6.2.0-beta.2
Additional information
I tested native WKWebView in SwiftUI, and it doesn't have this issue. The white padding area above the keyboard is appropriately sized, around a few dozen pixels, and doesn’t push content off-screen.
This issue occurs only on iOS; Android devices do not exhibit this problem.
Self grab
- I'm ready to work on this issue!