mrchandoo / cordova-plugin-decimal-keyboard

Cordova plugin to show decimal keyboard on iPhones
Apache License 2.0
37 stars 71 forks source link

Decimal button out of place on iPhoneX #19

Open bmanderscheid opened 6 years ago

bmanderscheid commented 6 years ago

The decimal button needs to be bumped up on iPhone X.

screenshot 2018-05-29 14 57 45
CosmicWebServices commented 6 years ago

Same issue here... going to see if I can fix it at some point.

bmanderscheid commented 6 years ago

A fix would be awesome! Definitely need a number pad like this for a few apps in production.

mrchandoo commented 6 years ago

both the color and position should be changed. @CosmicWebServices any PR ?

CosmicWebServices commented 6 years ago

I did not really have time to figure it out yet. Others can try it out if they want to.

fermedina commented 6 years ago

Has anyone solved this problem?

CosmicWebServices commented 6 years ago

I cannot figure out how to work this... And with the introduction of the new phones this is an even more important bug to fix

aiba commented 6 years ago

I solved this in my fork by refactoring how the button position rect is calculated relative to the other numeric keyboard buttons:

https://github.com/aiba/cordova-plugin-decimal-keyboard

I'd be happy to prepare a pull request if this project is still alive.

fermedina commented 6 years ago

@aiba I tested your fork and it does not show the decimal button. I have tried this:

<input type="text" pattern="[0-9]*" decimal="true" allow-multiple-decimals="false" decimal-char=",">

aiba commented 6 years ago

@fermedina that's weird, i just tried that exact tag and it works for me. What combo of simulator/iOS/device type are you testing with?

Also, how did you install my fork? Since I didn't publish it to any of the npm repos, you'd have to install it from its git address using cordova plugin add 'https://github.com/aiba/cordova-plugin-decimal-keyboard.git'.

Finally, if it's still not working, check the XCode log for a line that says "Positioning decimalButton at {{-2, 162}, {110, 54}}". Currently my fork logs the position of the decimal button in this way.

fermedina commented 6 years ago

@aiba I tested in my Ionic 3 application. I tried on my iPhone X.

I installed your fork using the full URL just like you say.

I will search your log

fermedina commented 6 years ago

@aiba on my iPhone X with iOS 12.1 the decimal button doesn't appear, but in the simulator it appears. With my iPhone X, in Xcode I see the following logs:

Can't find keyplane that supports type 4 for keyboard iPhone-PortraitChoco-NumberPad; using 20603_PortraitChoco_iPhone-Simple-Pad_Default

Positioning decimalButton at {{0, 0}, {0, 0}}

aiba commented 6 years ago

I don't think the keyplane warning is a problem. Every device or simulator I've tried this on has some sort of warning like that. On my physical iPhone XS Max running 12.1, It prints:

Can't find keyplane that supports type 4 for keyboard iPhone-PortraitTruffle-NumberPad; using 20615_PortraitTruffle_iPhone-Simple-Pad_Default

But the fact that it computed the decimalButton bounds as {{0, 0}, {0, 0}} is definitely the problem.

I wish I had some way of reproducing this. If you're willing to share your xcode project with me privately, I'd be happy to debug from that. Or if you could make a minimal example that I could use to reproduce, that would be ideal.

bmanderscheid commented 5 years ago

Hey guys, Any progress? Still can't find an alternative solution out there.

aiba commented 5 years ago

I've been using my fork (updated to work on iPhoneX), and it's been working great for me. I personally use an iPhone XS Max, and several of my app's users have iPhone X devices, and the decimal keyboard works for all of them. So, I recommend:

https://github.com/aiba/cordova-plugin-decimal-keyboard

bmanderscheid commented 5 years ago

great, I'll give it a shot! Thank you

bmanderscheid commented 5 years ago

@aiba working - thank you!