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

Show / Hide / Disable / Enable soft Keyboard Input (Android & iOS) #2408

Merged
merged 12 commits into from
Nov 11, 2024

Conversation

Mecharyry
Copy link

Connection with issue(s)

Resolve issue #1845

Provides a way to enable / disable, as well as show and hide the keyboard on iOS and Android devices.

Testing and Review Notes

See videos below. You may need to disable the disableInputAccessoryView: true in InAppWebViewSettings enabling / disabling does not remove this view by default.

  1. Use the InAppWebView example on an Android or iOS device
  2. Tap on an edit field in the webview, notice that the keyboard shows
  3. Tap to hide the keyboard, notice that the keyboard will now be disabled whenever tapping on an edit text field
  4. Tap to show the keyboard, notice that the keyboard is now enabled and reshown

Screenshots or Videos

Android iOS
android_input_method.mp4
ios_input_method.mov

@pichillilorenzo pichillilorenzo merged commit b9af92d into pichillilorenzo:master Nov 11, 2024
@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Nov 11, 2024

Thanks, I have updated the implementation and removed the android input method enable/disable logic as it changing it for the whole Android Activity!
If someone wants to disable the Android IMM service, it should be done outside of this plugin as it will impact the whole android application and not just the WebView.
Unfortunately, Android doesn't have any API like iOS "UIView.inputView".

@pichillilorenzo
Copy link
Owner

@all-contributors please add @Mecharyry for code

Copy link
Contributor

@pichillilorenzo

I've put up a pull request to add @Mecharyry! 🎉

@pichillilorenzo pichillilorenzo changed the title Disable / Enable Keyboard Input (Android & iOS) Show / Hide / Disable / Enable soft Keyboard Input (Android & iOS) Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants