Support => NGUI 3 Support => Topic started by: poolts on June 19, 2015, 06:40:02 AM
Title: UIInput Submit Button Deletes Last Character
Post by: poolts on June 19, 2015, 06:40:02 AM
Weirdly after updating to the latest NGUI version (3.9.0b) after typing a string on the keyboard and hitting the "Done / Submit" button it deletes the final character in the string.
I have no validation on the UIInput. On Return Key = Submit. I've added the screenshot to show the settings on the component.
Unity Version: 4.6.6
Title: Re: UIInput Submit Button Deletes Last Character
Post by: ArenMook on June 21, 2015, 08:00:50 PM
I see no reason why this would happen from NGUI's side. Can you narrow it down? Does switching to a bitmap font help? If you make an input field from scratch, does it work?
Title: Re: UIInput Submit Button Deletes Last Character
Post by: armanigt on July 06, 2015, 10:13:52 PM
I'm having the exact same issue. It's definitely only popped up the moment I upgraded to NGUI 3.9.
Title: Re: UIInput Submit Button Deletes Last Character
Post by: ArenMook on July 08, 2015, 06:32:26 PM
How would I go about reproducing it on my end? I just tried the Chat Window example that comes with NGUI, typed something, hit Return, everything works as expected.
Title: Re: UIInput Submit Button Deletes Last Character
Post by: betodeoliveira on August 11, 2015, 02:37:06 AM
I'm having the same problem. I'm running my project on iPhone 6 and if I have hide input enabled overtime that i hit the submit button the last char is deleted...
Title: Re: UIInput Submit Button Deletes Last Character
Post by: poolts on August 12, 2015, 04:53:20 AM
After updating to v3.9.1 (release version) I'm still getting the same behaviour. If I revert UIInput.cs back to v3.9.0 it seems to be fixed.
It looks likely that it may only be bugged on iOS / mobile (as I can't repo it in the editor).
I've found a workaround / fix (but obviously Aren would need to verify it).
I've changed line 672 in UIInput.cs (see below) to only do a backspace if the keyboard is not finished (i.e. not submitted or minimised)