Skip to content

setFocus() on ion-searchbar not working on ios #12119

Closed
@tobbbe

Description

@tobbbe

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request

Current behavior:
On iOS: Focus not set. Nothing happens.
Works on web or android

Expected behavior:
Show keyboard and set focus on searchbar

Steps to reproduce:
http://plnkr.co/edit/t92odwR27wFM7J8rym14?p=preview

Related code:
This is set in config.xml

<preference name="KeyboardDisplayRequiresUserAction" value="false" />

Other information:
This did NOT help: https://forum.ionicframework.com/t/problem-with-searchbar-setfocus-on-ios/80055

This message is displayed in xcode console:

Cant find keyplane that supports type 5 for keyboard

I have tried using different input types (text/number).
I get the same result on real device and emulator.

Ionic info::

global packages:

    @ionic/cli-utils : 1.3.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.3.0

local packages:
    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.3.0
    @ionic/cli-plugin-ionic-angular : 1.3.0
    Cordova Platforms               : android 6.2.3 ios 4.4.0
    Ionic Framework                 : ionic-angular 3.3.0

System:
    Node       : v6.10.1
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions