Ionic Keyboard Appearing Randomly on iOS? Try this…

I’ve spent waaaaay too much time today trying to figure this one out.

Part of an Ionic app we’re developing allows you to fill in various sections of a larger form and it’s been working great — with one exception: the iOS keyboard keeps appearing at the most inappropriate times without selecting any inputs whatsoever.

After scouring what feels like no fewer than a few million links throughout the Internet I eventually found a solution:

<button ui-sref="form.step2" data-tap-disabled="true">Next</button>

In my case, the keyboard was only appearing immediately after transitioning to a new view. By simply adding the data-tap-disabled attribute to the button that fires the transition cured the problem immediately!

I’ll be honest enough to say that even after reviewing the source code for the Ionic “tap” feature I still can’t fully work out why this rectifies the problem or what exactly is causing it in the first place. If anyone wants to tackle that one then check out the link below and feel free to impart your wisdom on me!

In the mean time hopefully this tip saves you some heartache :)

Head of Development at Scaffold (https://scaffold.digital). Hailing from Northern Ireland.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store