cordova-custom-keyboard icon indicating copy to clipboard operation
cordova-custom-keyboard copied to clipboard

close keyboard?

Open markshust opened this issue 9 years ago • 10 comments
trafficstars

How does one close the keyboard after data input?

markshust avatar May 03 '16 16:05 markshust

Click into webview?

mnill avatar May 03 '16 16:05 mnill

I'm not sure I understand. We have no webview in safari ;)

markshust avatar May 03 '16 16:05 markshust

I'm thinking there should be an equivalent CustomKeyboard.close?

markshust avatar May 03 '16 16:05 markshust

I am sorry, it is plugin for cordova. Cordova - html5 crossplatform applications platform based on webviews. It will not working in safari.

mnill avatar May 03 '16 16:05 mnill

I'm sorry -- I meant embedded browser in Simulator.

Once CustomKeyboard is triggered, it never closes, no matter what is focused on. I'm just showing the simulator persisting the keyboard no matter what I do:

screen shot 2016-05-03 at 12 53 05 pm

I'd expect on blur, it to close.

markshust avatar May 03 '16 16:05 markshust

On my devices all works fine(i am not tested on simulators, will try it later). Are you sure you correctly install and use my plugin? Decemical(not number keyboard) looks like this: img_0020

With dot symbol in left bot, you have opened standard number keyboard.

mnill avatar May 03 '16 16:05 mnill

Yes, pretty sure i'm triggering it correctly. In this case, I just wanted the keypad:

    if (_.isObject(CustomKeyboard)) {
      CustomKeyboard.open(this.state.numSingles, 5, function (value) {
        console.log('custom', value)
      });
    }

The keypad shows correctly (even all the different types), however it doesn't close automatically on blur.

markshust avatar May 03 '16 17:05 markshust

It is strange, i tested just right now. All works fine, even in simulator.

Anyway i realized 'close' method for you.

If you want to contribute, or anyone also faced with same issue there is minimum worked project with pure cordova for testing.

keyboard.zip

mnill avatar May 03 '16 17:05 mnill

I also cannot close the keyboard. Both in the sim and on a device (the newest ios). What's interesting the keyboard closes when taping on some html elements for example title bar or another input which, but not on some other without a particular case.

rafaellop avatar Jun 05 '16 23:06 rafaellop

Looks like invisible full screen div can resolve this issue.

mnill avatar Jul 03 '16 06:07 mnill