Author Topic: UIInput on mobile does not fire OnSubmit first time  (Read 1495 times)

niniane

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 7
    • View Profile
UIInput on mobile does not fire OnSubmit first time
« on: June 05, 2014, 08:31:18 PM »
I'm using an UIInput NGUI widget on iPhone.  The first time I press my button, edit the text using TouchScreenKeyboard, and press "Done", there is no "OnSubmit" fired.  When I open the edit box again, the text has reverted back to its original values.

The second and subsequent times that I press the button and edit the text, I do get "OnSubmit" fired, and my text changes stay applied.  Is this a known issue?

How can I get the OnSubmit to fire the first time also?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput on mobile does not fire OnSubmit first time
« Reply #1 on: June 06, 2014, 02:35:52 AM »
No, I haven't heard of this before. OnSubmit is always fired, unless the keyboard is closed instead of submitting. You can add some NGUIDebug.Log statements to the UIInput script where the keyboard gets closed (in the Update function) to make sure it happens.