Author Topic: Inputfield Focus on Android  (Read 367 times)

iiidefektiii

  • Newbie
  • *
  • Posts: 6
Inputfield Focus on Android
« on: May 16, 2018, 01:02:25 PM »
I have an inputfield on a Pixel 2 XL. using Unity 2017.3.1 p4 I downloaded the 2017.3 package from the forum.

My issue is that when I tap the input field it opens the keyboard then closes it if I don't keep my finger on the screen the entire time I'm typing. (My only way around it right now).

How can I fix this so i don't have to keep one finger on the screen for focus and the other to type on the android keyboard?

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5619
Re: Inputfield Focus on Android
« Reply #1 on: May 16, 2018, 01:46:05 PM »
This is likely a bug in Unity itself.

Were you able to check if you get the same behavior using Unity 2017.4 (latest release) or in an older version of Unity?

Is this behavior unique to the Pixel 2 XL or were you able to also observe this on other Android devices?

iiidefektiii

  • Newbie
  • *
  • Posts: 6
Re: Inputfield Focus on Android
« Reply #2 on: May 16, 2018, 01:53:35 PM »
I will check that version when i get a few. With the project due in a few days I can't afford to. This is a tool I am creating that they dont see. So for now I can deal with it unti I get a sec. Will report back soon!

iiidefektiii

  • Newbie
  • *
  • Posts: 6
Re: Inputfield Focus on Android
« Reply #3 on: May 17, 2018, 06:24:59 AM »
Tried with the Unity Input field and it reacts the same way. So this is not a TextMesh Pro Issue.

If this is the case it's been broken for a while since this project was originally built in 2017.1

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5619
Re: Inputfield Focus on Android
« Reply #4 on: May 17, 2018, 11:42:28 AM »
Tried with the Unity Input field and it reacts the same way. So this is not a TextMesh Pro Issue.

If this is the case it's been broken for a while since this project was originally built in 2017.1

Was that in 2017.4 latest release?

Also need to see if this might be specific to that device or even a specific version of Android OS.

I'll check on my end / internally to see if I can find any reports on this. I would strongly suggest submitting a bug report so the Android folks inside Unity can take a look at this.

iiidefektiii

  • Newbie
  • *
  • Posts: 6
Re: Inputfield Focus on Android
« Reply #5 on: May 18, 2018, 08:33:33 AM »
It occurred on Unity 2017.1 and 2017.3 p4, at least those are the 2 I've used with it. Trying 2017.4 today if I can get to it.

Also wasn't specific to a version of Android OS. I tried on a Galaxy S7 with Android 7.0 and a Google Pixel 2 XL with Android 8.1.0 with the same result with both TextMesh Pro and Unity's UI.

iiidefektiii

  • Newbie
  • *
  • Posts: 6
Re: Inputfield Focus on Android
« Reply #6 on: May 18, 2018, 09:30:11 AM »
I just tried on 2017.4.3 and same thing. just opens and closes unless you leave your finger on the screen to type.

Just to verify with TextMesh I have all the defaults set.

OnFocus - Select All - Checked
Reset On DeActivation - Checked
Restore on ESC Key - Checked
Hide Mobile Input - Unchecked
Read Only - Unchecked
Rich Text - Checked

No other options would prevent this? If not I will open a Unity bug.

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5619
Re: Inputfield Focus on Android
« Reply #7 on: May 18, 2018, 09:47:54 AM »
I just tried on 2017.4.3 and same thing. just opens and closes unless you leave your finger on the screen to type.

Just to verify with TextMesh I have all the defaults set.

OnFocus - Select All - Checked
Reset On DeActivation - Checked
Restore on ESC Key - Checked
Hide Mobile Input - Unchecked
Read Only - Unchecked
Rich Text - Checked

No other options would prevent this? If not I will open a Unity bug.

This looks to be an Android specific issue so I would submit a bug report. Please post the case # once you have filed it.

P.S. Did you try on a different device or using a different version of the Android SDK? This could be also be related to a change to the Android SDK.

iiidefektiii

  • Newbie
  • *
  • Posts: 6
Re: Inputfield Focus on Android
« Reply #8 on: May 18, 2018, 10:40:16 AM »
Did some more testing now that I have the time. Ended up working in a new project with all my packages like TextMesh, ARCore and AV Pro.

Ended up being Touchscript that was causing issues with the inputfield.....

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5619
Re: Inputfield Focus on Android
« Reply #9 on: May 18, 2018, 10:47:57 AM »
Did some more testing now that I have the time. Ended up working in a new project with all my packages like TextMesh, ARCore and AV Pro.

Ended up being Touchscript that was causing issues with the inputfield.....

That is good to know

More importantly, thank you for taking the time to look deeper into this and for sharing this information.