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

Input disappears after using comma

Open maxsebes opened this issue 9 years ago • 7 comments
trafficstars

Hi,

The Keyboard (Decimalpad) works well ons iOS, but when a comma is entered, the input just disappears. However, when clicked outside the keyboard, the alert does give the correct value.

Is there a way to keep the input visible?

Thanks!

Note: I'm using Phonegap Build

maxsebes avatar Sep 03 '16 19:09 maxsebes

, or . depended by phone language i think. Just replace , with . in your js code.

mnill avatar Sep 03 '16 19:09 mnill

Thanks for the fast support! How can I change that?

maxsebes avatar Sep 03 '16 19:09 maxsebes

Something like this, not tested by me. CustomKeyboard.open(document.getElementById('decimal').value, 9, function (value) { value = value.replace(/,/g , '.'); document.getElementById('decimal').value = value; }, function (value) { alert('Editing ended with ' + value); fired once when user finished editing. })

mnill avatar Sep 03 '16 19:09 mnill

Thanks! It works!

And just before the keyboard is fired, the normal keyboard shows up. Is there a way to disable this?

maxsebes avatar Sep 03 '16 20:09 maxsebes

Just make input not editable or prevent propagnition in js or something else.

mnill avatar Sep 03 '16 20:09 mnill

Hi,

I am facing the same issue. Just before the keyboard is fired, the normal keyboard shows up.

I tried using event.stopPropagation() ($event.stopPropagation() since it's an ionic 1.x project) or setting the input to readonly but it's not working for me.

Any ideas on what else I could try?

kas84 avatar Apr 01 '17 09:04 kas84

<input type='text' readonly /> doesn't work?

mnill avatar Apr 01 '17 13:04 mnill