Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

(IOS) How to stop native.keyboardhide event from firing when focusing an input element? #173

Open
vandervidi opened this issue Feb 17, 2016 · 3 comments

Comments

@vandervidi
Copy link

In IOS, When i tap and focus an input element the native.keyboardshow event fires and the keyboard pops up. This is absolutely fine.
Then,while the keyboard is up, When tapping another input element and focusing it for some reason the
native.keyboardhide event fires and then the native.keyboardshow fires.
Why does it happen in IOS? and how can i prevent this behaviour so that when one input is focused and the keyboard is up --> focusing another input element would not trigger the native.keyboardhide event??

@vandervidi vandervidi changed the title (IOS) How to stop native.keyboardhide event when focusing an input element? (IOS) How to stop native.keyboardhide event from firing when focusing an input element? Feb 17, 2016
ramonornela added a commit to zellotec/ionic-plugin-keyboard that referenced this issue Jun 16, 2016
@ramonornela
Copy link

+1

@slorber
Copy link

slorber commented Jun 28, 2016

You can probably use _.debounce for that (but it may add a little latency to the code you run in the listener)

@keenan35i
Copy link

Here is an easy workaround:

var checker = true;

function keyboardShowHandler(e) {
    checker = true;
}

function keyboardHideHandler(e) {
    checker = false;
    setTimeout(function() {
        if (checker == false) {
            // do stuff when acually closed
        }
    }, 30);
}

vinhbt pushed a commit to vinhbt/ionic-plugin-keyboard that referenced this issue Oct 11, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants