Can't submit using a numeric text field on iOS

Hello all,

Using the latest Corona SDK public build, I’m trying to create a new text field (numeric) and I can’t submit the input (and so, cannot close the virtual keyboard). No “return” button is present.

Issue only present on iOS.

Note that on Android, a submit button is present, that submits and closes the virtual keyboard.

Screenshot attached.

Thank you,

Radu

Hi.  I’d suggest making a small testbench showing the problem with these files:

  • config.lua
  • build.settings
  • main.lua

Zip the project up, then you can submit a bug here: https://developer.coronalabs.com/content/bug-submission, and submit the code as an attachment.

I’d also share a link to the code here so we can look and see if something is missing or incorrect.

Cheers,

Ed

PS - I see you said the latest public build.  I suggest using the latest DAILY build instead:  2015.2702

https://developer.coronalabs.com/downloads/daily-builds/

It turns out that Apple doesn’t include a “Done” button on the number keyboard for iPhone devices. It’s there for iPad but not iPhone. If you do a google search you will find a number of sites discussing this.

You can add your own Done and Cancel buttons for numeric keyboards when you detect it’s running on an iPhone device. Calling native.setKeyboardFocus( nil ) will clear the keyboard. You can also clear the keyboard when the user touches an area outside the text field by adding a touch listener.

I wouldn’t consider this a bug but a new feature request since there is a work-around using Lua code.

Hi Ed and Tom,

Thank you both for your replies.

Indeed, it seems there is a different component for “Done and Cancel” on iOS.

Although creating the custom buttons wouldn’t seem right without having a reference to the keyboard’s position.

Regards,

Radu

Hi.  I’d suggest making a small testbench showing the problem with these files:

  • config.lua
  • build.settings
  • main.lua

Zip the project up, then you can submit a bug here: https://developer.coronalabs.com/content/bug-submission, and submit the code as an attachment.

I’d also share a link to the code here so we can look and see if something is missing or incorrect.

Cheers,

Ed

PS - I see you said the latest public build.  I suggest using the latest DAILY build instead:  2015.2702

https://developer.coronalabs.com/downloads/daily-builds/

It turns out that Apple doesn’t include a “Done” button on the number keyboard for iPhone devices. It’s there for iPad but not iPhone. If you do a google search you will find a number of sites discussing this.

You can add your own Done and Cancel buttons for numeric keyboards when you detect it’s running on an iPhone device. Calling native.setKeyboardFocus( nil ) will clear the keyboard. You can also clear the keyboard when the user touches an area outside the text field by adding a touch listener.

I wouldn’t consider this a bug but a new feature request since there is a work-around using Lua code.

Hi Ed and Tom,

Thank you both for your replies.

Indeed, it seems there is a different component for “Done and Cancel” on iOS.

Although creating the custom buttons wouldn’t seem right without having a reference to the keyboard’s position.

Regards,

Radu