Author Topic: UIInput issues in NGUI-3.9.2  (Read 11176 times)

SHILPA

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
UIInput issues in NGUI-3.9.2
« on: August 20, 2015, 01:00:06 AM »
Hi,

I am facing four issues in UIInput on IOS mobile device. These issues are describe as follow:

1) Pressing any key of keyboard once, it got typed until the maximum limit reached in Input box.
2) Two time selections of input box shifts the caret position to right.
3) Input box hides behind the keyboard, the input box should move upwards when keyboard hides it.
4) We want to create a Text field, so i created UIInput which allows multiple lines. The input box can show three lines and when we type 4th line, text did not shifts and the 4th line is typed outside the view of input box.

Please help us to solve these issues. Thanks in advance.

Regards,
Shilpa

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #1 on: August 20, 2015, 04:22:39 AM »
I've noticed that #2 also happens in the editor, and with PC builds.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #2 on: August 22, 2015, 02:14:35 AM »
Hmm... In regards to #1 all I can think that may be relevant is changing UIInput.cs line 689:
  1.                         if (inputShouldBeHidden)
  2.                         {
  3.                                 if (text != "|")
  4.                                 {
  5.                                         if (!string.IsNullOrEmpty(text))
  6.                                         {
  7.                                                 Insert(text.Substring(1));
  8.                                         }
  9.                                         else if (!mKeyboard.done && mKeyboard.active)
  10.                                         {
  11.                                                 DoBackspace();
  12.                                         }
  13.                                         mKeyboard.text = "|"; // <-- Move this outside the "if" statement above
  14.                                 }
  15.                         }
#2, if I understood it correctly, is intentional. Select the input field, and its text will be selected. Tap on it again, and the cursor will be moved to wherever you tapped it.

#3 I am not quite clear on. A pic might help.

#4 seems like some missing setting / Unity bug. Check to see how NGUI tells Unity to open the keyboard. Perhaps some newly added setting is the culprit. Line 662.

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #3 on: August 22, 2015, 08:47:31 PM »
#2:

- add UIInput prefab
- script input.isSelected = true;  (the input has focus and the caret appears)
- click input (anywhere) and the caret shifts to the right

slightly annoying anomaly...


SHILPA

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #4 on: August 25, 2015, 07:39:44 AM »
Thanks for helping me to solve these problem.
ArenMook issues are explained as follow:
#2 Without writing anything, double tapping on input field shifts the cursor.
#3 Please see the picture of this issue in attachment.
#4 There are issues while creating multiline input field. If we can see 3 line in the height of input field, while typing 4th line , the first line should be move upwards and clipped from the view of input field. But this is not happening in multiline input field of NGUI.

SHILPA

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #5 on: August 25, 2015, 08:02:10 AM »
Hi,

We are facing one more issue in NGUI Input. Issue is as follow:

1) OnSubmit function is called on return, but is also called when we hide the keyboard. We don't want to call my onSubmit function when we hide the keyboard.

Thanks and regards,
Shilpa Mittal.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #6 on: August 26, 2015, 12:23:45 PM »
The iOS part of UIInput hasn't been touched in well over a year, so #4 sounds like some issue either Unity introduced, or the iOS updates themselves. All I can suggest is check how UIInput opens the keyboard using TouchScreen.Open.

I'll check the functionality of others some time later this week. I'm out-of-the-house right now on the account of a newborn, so can't do much right now.

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #7 on: October 14, 2015, 04:40:51 PM »
bump

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #8 on: October 18, 2015, 06:33:42 PM »
Old post for a bump, what issue are you bumping?

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #9 on: October 18, 2015, 07:54:51 PM »
Old post for a bump, what issue are you bumping?

#2 from Shilpa's original post.  This problem is extremely annoying and easily reproduced.  possibly an intentional effect?  i havent looked into what is causing it...

- add an input prefab to any new scene. 
- tap/click the input box so the input box gains focus.
- tap the input box again, anywhere, and the caret shifts...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput issues in NGUI-3.9.2
« Reply #10 on: October 24, 2015, 04:17:19 AM »
Second click places the caret under the cursor.