Prevent hiding keyboard on Android back button


#1

Hi

I have a text input which shows the keyboard when focused.
Can someone offer advice on how to prevent the keyboard from hiding when the Android back button is hit?

I have the following code:

    $ionicPlatform.registerBackButtonAction(function () {
        event.preventDefault();
        event.stopPropagation();
    }, 100);

I’ve tried a constant-focus directive as shown here: http://stackoverflow.com/a/25899264/81053 but this doesn’t seem to do anything.

Thanks


#2

I believe the “back” button actually becomes a “hide keyboard” button when the keyboard is displayed – I don’t know how you’d keep that from happening, though.


#3

But I’m thinking that my function should have higher priority - if i change the 100 to say 9999 it still doesn’t work…