Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS WebView + Keyboard Crash on Date Picker and Dropdown Selection (iOS 17+) #2535

Open
1 of 2 tasks
JaimilPatel opened this issue Feb 19, 2025 · 0 comments
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@JaimilPatel
Copy link

JaimilPatel commented Feb 19, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Our Flutter app using flutter_inappwebview experiences crashes when interacting with date picker and dropdowns inside a WebView on iOS 17+ devices. The issue does not occur on iOS 17.4 Simulator but is consistently reproducible on real devices.

When selecting a date input field (nbcalendar JavaScript picker), the keyboard unexpectedly opens, causing excessive memory usage, and eventually, the app is killed by the OS due to low memory (EXC_BAD_ACCESS).

Steps to Reproduce:
Use flutter_inappwebview to load a web page containing a JavaScript-based date picker (nbcalendar).
On an iOS 17+ real device, tap on the date picker.
The keyboard opens unexpectedly , Memory usage increases, and after multiple interactions, the app is terminated by iOS due to excessive memory usage.

Expected Behavior

The WebView should not crash when interacting with date picker or dropdown and similar type of input fields which doesn't require keyboard.

Steps with code example to reproduce

Steps with code example to reproduce
                        InAppWebView(
                        initialUrlRequest:
                            URLRequest(url: Uri.parse(_webPageUrl)),
                        onWebViewCreated: (InAppWebViewController controller) {
                          _webViewController = controller;
                        },
                        onUpdateVisitedHistory:
                            (controller, url, androidIsReload) {
                          _callBackListener(controller, url.toString());
                        },
                        onLoadStop: (controller, uri) {
                          _sendEventToGetCountOfPageInForm();
                        },
                        gestureRecognizers: _gestureRecognizers,
                      )

Stacktrace/Logs

Stacktrace/Logs
I'm unable to get any logs related to this issue

Flutter version

3.3.0

Operating System, Device-specific and/or Tool

Issue faced in : iOS 17+ Apple Devices
Xcode : 15.3
macOS: Sonoma 14.4.1

Plugin version

5.8.0

Additional information

I am using Xcode 15.3 to generate ipa from IOS devices

Its working as expected in iOS 15.6.1 , iOS 16.6 as i have checked it multiple times.
Is this a known issue in iOS WebView (WKWebView) on iOS 17+?
Could this be caused by memory leaks within flutter_inappwebview when handling form inputs?
Any suggestions on workarounds or fixes for production apps?

This issue is affecting our end users and needs urgent attention. Any help or guidance on fixing this issue would be greatly appreciated.

Best regards,
Jaimil Patel

Self grab

  • I'm ready to work on this issue!
@JaimilPatel JaimilPatel added the bug Something isn't working label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant