-
Notifications
You must be signed in to change notification settings - Fork 598
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
WKWebView is not resized properly after the native keyboard closes #2194
Comments
I believe the issue may also be linked to the native resize mode. Just a suspicion at this stage.... I've fully removed native resize mode use from the app and will report back if it seems to stop occurring. |
Reporting back with my findings: I removed any usage of the 'Native' resize mode, and in the week since I have not seen the issue I described in any devices. My team has tested several builds and we normally would've seen the issue a couple times by now. I am certain the issue was being caused by my use of the native resize mode somehow. |
This issue needs more information before it can be addressed. Please see the Contributing Guide for how to create a Sample App. Thanks! |
By all means close this issue. I appreciate I can offer no reproduction. Hopefully if someone else has the same issue they can at least find this! 🙏 |
Hey @drakedeatonuk, I'd run into a similar problem. While debugging I saw that the resize mode got changed while the keyboard was open. This results in the web view frame not being reset to its original size. Maybe you've encountered something similar. I've open this as an issue. |
@cornelius-behrend very interesting I never even thought to test that! Maybe I'm not seeing it anymore then because I'm barely switching resize mode or even calling the change resize mode function now. Well done finding a way to reproduce this bug. It was an issue for me for many months! |
Bug Report
Plugin(s)
@capacitor/keyboard 6.0.2
Capacitor Version
@capacitor/cli: 6.1.2
@capacitor/core: 6.1.2
@capacitor/android: 6.1.2
@capacitor/ios: 6.1.2
Platform(s)
ios & android
Current Behavior
Occasionally, when the keyboard closes, the webview doesn't resize. Instead it leaves a massive empty black space where the keyboard was. Even on subsequent opens & closes of the keyboard, the webivew then never resizes.
Expected Behavior
The webview should always resize to fill this space when the keyboard closed.
Code Reproduction
Unfortunately this issue is very hard to reproduce. I see it maybe once a week. The only pattern I've identified so far is that it seems to happen in low power mode on my iphone.
Additional Context
I've seen this issue appear on several devices, and there seems to be at least one other ticket open on webview resizing issues (#831).
The text was updated successfully, but these errors were encountered: