ionic-framework: Ionic 2 - IOS 10 Keyboard bug

Short description of the problem:

This happens on every ios 10 device. If you open a dialog (alert) und enter something into an input field and you close the dialog (by clicking the close button), then the keyboard will stay open and not close. I’ve tried to use the ionic keyboard plugin to close the keyboard manually upon clicking the button (Keyboard.close()), but it has zero affect.

I’ve created a new blank project (ionic start testProj --v2 --ts) and added a dialog with an input field and a button (actually took the code from the docs to make sure), it has the same effect.

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc) There are no error messages or whatsoever.

Which Ionic Version? 1.x or 2.x 2

Run ionic info from terminal/cmd prompt: (paste output below) Your system information:

Cordova CLI: 6.3.1 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.11 Ionic CLI Version: 2.0.0-beta.37 Ionic App Lib Version: 2.0.0-beta.20 OS: Node Version: v6.3.0

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 14
  • Comments: 37 (6 by maintainers)

Commits related to this issue

Most upvoted comments

This happens in Ionic 2 RC0 as well; fixing this soon would greatly improve the confidence of those of us who are considering Ionic for a new app but want assurance that it will stay on top of device platform updates.

Is there an update to this bug? With RC.1 and iOS10 I still see the bug.

For me it’s a pain to update my ionic2 beta 11 app version to RC0…

Same problem here, the keyboard does not close and it’s a big problem for iOS apps…

@robvr I am also having this issue. Did you ever find a fix? I am using iOS 11.

Thanks @peterpeterparker! It should close on blur but this worked as a workaround…

I’ve made some updates to how alerts work when there’s a text input, and it’s on a mobile device. Would this group be able to test out our nightly version and let me know how it goes? Thanks

It also happens to me on RC1, and not in an alert. Just on a regular input on a regular form, if you send the form by tapping on return key, after the redirect with this.nav.setRoot the keyboard keeps open.

Thanks @John0x this is a good fix. Someone here notice there is a strange behavior when you launch an alert ? The view (only the content not the header) is turning white for some millisecond and then the alert is shown.

It’s the RC, so there shouldn’t be alot of big changes anymore. The Keyboard doesn’t close automatically but you can close it yourself by subscribing to the onWillDismiss event and then close it manually (Keyboard.close() with the Keyboard plugin).

@John0x would you mind trying this with our wkwebview plugin. Thanks!