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

feat(keyboard): Animate webview on keyboard open / close #923

Open
Aarbel opened this issue Apr 13, 2022 · 3 comments
Open

feat(keyboard): Animate webview on keyboard open / close #923

Aarbel opened this issue Apr 13, 2022 · 3 comments

Comments

@Aarbel
Copy link

Aarbel commented Apr 13, 2022

Feature Request

Plugin

Keyboard

Description of current problem

When using KeyboardResize.Body as option, cf https://capacitorjs.com/docs/apis/keyboard#keyboardresize, the interface has a whole app glitch:

ON OPENING

  • the keyboard opens
  • then the webview height is set to a lower height, creating a content instant "pop"

ON CLOSING

  • the keyboard closes, creating an empty area (cf the red area on the gif bellow)
  • the webview height is 100%, but expands instantly as a glitch

cordova keyboard issue

Platform(s)

iOS
Android

Preferred Solution

Make the webview height follow the keyboard height, or change instantly when keyboard begins to open.

Additional Context

Similar never resolved issue with Corodva: cjpearson/cordova-plugin-keyboard#22

@Aarbel Aarbel changed the title feat(keyboard): Animate webview on keyboard open feat(keyboard): Animate webview on keyboard open / close Apr 13, 2022
@Aarbel
Copy link
Author

Aarbel commented Apr 13, 2022

@jcesarmobile
Copy link
Member

Sadly those are internal views of the WKWebView, not the WKWebView. When using body or ionic modes the WKWebView is not resized at all, those modes resize the app's body or the ion-app element by using javascript.
Not saying it wouldn't be possible, but not like in the link you provided, it would be way more complex.

For resize native, that it's the only one resizing the WKWebView I tried animating it in the past with similar code than the one on the link you provided, but despite the WKWebView was following the animation correctly, some of its internal views would resize because of their parents resizing and also showed different visual glitches because of that.

@jcesarmobile jcesarmobile added plugin: keyboard type: feature request A new feature, enhancement, or improvement labels Apr 21, 2022
@digaus
Copy link

digaus commented Dec 16, 2022

Any other options here? Really looks out of place on iOS :/

Only option it seems is to use None and add a custom animation? Native mode does also not provide an animation :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants