Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal button out of place on iPhoneX #19

Open
bmanderscheid opened this issue May 29, 2018 · 16 comments
Open

Decimal button out of place on iPhoneX #19

bmanderscheid opened this issue May 29, 2018 · 16 comments

Comments

@bmanderscheid
Copy link

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

screenshot 2018-05-29 14 57 45

@CosmicWebServices
Copy link

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

@bmanderscheid
Copy link
Author

bmanderscheid commented Aug 2, 2018

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

@mrchandoo
Copy link
Owner

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

@CosmicWebServices
Copy link

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

@fermedina
Copy link

Has anyone solved this problem?

@CosmicWebServices
Copy link

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
Copy link
Contributor

aiba commented Nov 18, 2018

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
Copy link

@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
Copy link
Contributor

aiba commented Nov 19, 2018

@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
Copy link

@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
Copy link

fermedina commented Nov 20, 2018

@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
Copy link
Contributor

aiba commented Nov 20, 2018

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
Copy link
Author

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

@aiba
Copy link
Contributor

aiba commented Mar 7, 2019

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
Copy link
Author

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

@bmanderscheid
Copy link
Author

@aiba working - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants