textfield event.phase ended or submitted not being recognized on device

I was using widget candy for text input  on a iPad app it worked until IOS 7 then wouldnt accept any text.  So I re wrote and used Native text field instead. It works fine in the simulator but on ipad the only way to end the event is to actually Hide the keyboard using the hide keyboard button on the ipad display tapping the screen or return have no effect.  Any one have any idea what might be going on?  I already had to reduce some of the functionality of the app when removing widget candy and Im sure I will get alot of users not figuring out they have to hide the keyboard to enter text.

Thanks

Rick

Not sure, but maybe you can create an invisible rect covering the entire screen when the keyboard is visible, and when the rect is tapped hide the keyboard? 

i had this problem, i think i solved it by changing the listener.

in your listener function, instead of this

[lua]

local function listener ( phase) 

[/lua]

try 

[lua]

local function listener (self,phase)

[/lua]

i think the example in the docs may not be correct

Hi @boss1,

Is the document you refer to this one? If so, which example do you suspect is incorrect, so I may test it out?

http://docs.coronalabs.com/api/library/native/newTextField.html

Rick,

Is this issue isolated to iOS7? Does it work properly on <=iOS6.1 ?

Sincerely,

Brent Sorrentino

i think so, i’m at work so i can’t check out my code . i used the first example.

my listener wasn’t reacting to the event parameter, until i added the ‘self’ parameter to the function.

it could be how i set up the listener. i’ll check tonight.

i checked my code, i’m creating the textfield and listener like in the first example.:

[lua]

local function textListener(self, event)

    print(event)

    if event.phase == “ended” or event.phase == “submitted” then

        native.setKeyboardFocus( nil )

        – set the high score at the current public place to be this text

       – do some stuff

    end

end

==

public.textf = native.newTextField(400,600,200,40)

– add callback for text entry, 

public.textf.userInput = textListener

public.textf:addEventListener( “userInput”, public.textf )

        

[/lua]

*except* for the additional ‘self’ parameter this is the same as the example in the docs

this works on device and in the simulator on mac.

removing the ‘self’ parameter breaks the functionality.

i tried versions 1196 and 1210 same result oh and this is iOS 6

*subliminal message*

please can we have native text field functionality on the pc please

*/subliminal message*

Not sure, but maybe you can create an invisible rect covering the entire screen when the keyboard is visible, and when the rect is tapped hide the keyboard? 

i had this problem, i think i solved it by changing the listener.

in your listener function, instead of this

[lua]

local function listener ( phase) 

[/lua]

try 

[lua]

local function listener (self,phase)

[/lua]

i think the example in the docs may not be correct

Hi @boss1,

Is the document you refer to this one? If so, which example do you suspect is incorrect, so I may test it out?

http://docs.coronalabs.com/api/library/native/newTextField.html

Rick,

Is this issue isolated to iOS7? Does it work properly on <=iOS6.1 ?

Sincerely,

Brent Sorrentino

i think so, i’m at work so i can’t check out my code . i used the first example.

my listener wasn’t reacting to the event parameter, until i added the ‘self’ parameter to the function.

it could be how i set up the listener. i’ll check tonight.

i checked my code, i’m creating the textfield and listener like in the first example.:

[lua]

local function textListener(self, event)

    print(event)

    if event.phase == “ended” or event.phase == “submitted” then

        native.setKeyboardFocus( nil )

        – set the high score at the current public place to be this text

       – do some stuff

    end

end

==

public.textf = native.newTextField(400,600,200,40)

– add callback for text entry, 

public.textf.userInput = textListener

public.textf:addEventListener( “userInput”, public.textf )

        

[/lua]

*except* for the additional ‘self’ parameter this is the same as the example in the docs

this works on device and in the simulator on mac.

removing the ‘self’ parameter breaks the functionality.

i tried versions 1196 and 1210 same result oh and this is iOS 6

*subliminal message*

please can we have native text field functionality on the pc please

*/subliminal message*