Ionic filter bar: keyboard does not open

Today I was working on this problem with an Ionic app. This is an app which uses the ionic-filter-bar plugin, which seems to works fine out of the box. Well, in most cases. With iOS 6 and iOS 9 the keyboard was failing to open when I tapped on the search icon. The problem is described here:

https://github.com/djett41/ionic-filter-bar/issues/13

(…) I need to double press into the input field. After the second click into the input field the keyboard is shown and the input field is focused (…)

Near the bottom of the page it is suggested to add the KeyboardDisplayRequiresUserAction preference. That actually is on the plugin README, and I already had that on my app. What is suggested is add this to config.xml:

<platform name="ios">
 <preference name="KeyboardDisplayRequiresUserAction" value="false"/>
</platform>
But what worked for me was adding the preference directly under the xml root node:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" (…)>
(…)
 <preference name="KeyboardDisplayRequiresUserAction" value="false"/>
(…)
After this change the keyboard opens as expected.

Leave a comment