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

fix(keyboard): Change keyboard style during setStyle #1920

Merged
merged 4 commits into from
Nov 30, 2023

Conversation

theproducer
Copy link
Contributor

Fixes an issue on iOS 17 where setting keyboard style would not apply the new appearance.

closes: #1905

Copy link

github-actions bot commented Nov 28, 2023

Released dev build of keyboard with dev version: 6.0.0-dev-1920-20231130T153844.0

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't fix the reported issue.
The reported issue is when the keyboard is hidden, if you change the style, next time the keyboard appears it still has the old style on iOS 17 devices, and on the second time it appears it has the correct style.
So calling [self changeKeyboardStyle:self.keyboardStyle]; on onKeyboardWillHide will have no effect since the keyboard is hidden and onKeyboardWillHide will not be called.

What seems to work is to call [self changeKeyboardStyle:self.keyboardStyle]; inside the - (void)setStyle:(CAPPluginCall *)call.

@theproducer
Copy link
Contributor Author

...when the keyboard is hidden...

Ah right, sorry, I was tunnel visioned in to testing toggling open keyboards back and forth.

@theproducer theproducer changed the title fix(keyboard): Setting keyboard style during onKeyboardWillHide fix(keyboard): Change keyboard style during setStyle Nov 30, 2023
Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theproducer theproducer merged commit f5ef4dc into main Nov 30, 2023
12 checks passed
@theproducer theproducer deleted the keyboard/ios-set-style branch November 30, 2023 21:11
LaravelFreelancerNL pushed a commit to dennis-wedevise/capacitor-plugins that referenced this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

iOS 17: Keyboard.setStyle not updating keyboard style until the second time you open it
3 participants