Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Search box keeps losing focus

Search box keeps losing focus 1 month 2 weeks ago #2328

  • jimmyt3d
  • jimmyt3d's Avatar
  • Offline
  • Junior Member
  • Posts: 39
  • Thank you received: 1
  • Karma: 1
*Updated*

Hi Frank,

I've noticed a bug whereby if a term is not currently visible on the the Terms list, the search box will lose focus after the first 2 letters have been typed.
Please see this video for the bug occurring -


Steps -

- Open Language source
- Go to 'Terms'
- Click into the search box at the bottom and attempt to type something in that is not currently visible on the list

Observe the text box will lose focus after the first 2 letters, resulting in having to keep clicking back in the box. The same occurs when you try and delete the text, except it loses focus when you have 1 letter left to delete, then again after the last letter has been deleted.
Observe in the video, searching for "URL" loses focus after UR, without even getting to the URL results until I click back into the box and type the L.
With the word LABEL it loses focus after LA, but at least finds the LABEL results in this instance.
Searching for both these words with them visible on screen does not result in the issue occurring.

It appears to be something to do with the search box cancelling when it thinks it has found all that can be found with those first few letters. If this is intentional, can you please make it so the box always remains active regardless, as it is very frustrating to have to keep clicking back in over and over again even if you just wish to delete what you have just typed.

2.6.12 f2

Thanks
Last Edit: 1 month 2 weeks ago by jimmyt3d.
The administrator has disabled public write access.

Search box keeps losing focus 1 month 2 weeks ago #2329

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 834
  • Thank you received: 181
  • Karma: 53
Hi,
Thanks for the detailed explanation!!
I was able to reproduce the problem. It is because the selected term stops showing when you type a mismatching name. That's why everytime the selected term become visible or hidden, the textfield looses its focus.

I haven't found a proper workaround yet, I'm trying to figure a better way.
Nonetheless, I uploaded to the beta folder (v2.7.0 f2) with a workaround that fixes the issue.

I made it so that as soon as you click on the search box, the selection is removed. That way you can type without problems. This maybe a good idea on the long run, given that whenever you click that field you are trying to search a different term, so its good to collapse the current one, so that you can see more of the list in screen.

To get the fix, either download v2.7.0f2 from the beta folder.
Or modify the file Assets\I2\Localization\Scripts\Editor\Localization\LocalizationEditor_Terms.cs line 452
to this:
			GUI.SetNextControlName("TermsFilter");  // add this line

			KeyList_Filter = EditorGUILayout.TextField(KeyList_Filter, GUI.skin.GetStyle("ToolbarSeachTextField"), GUILayout.ExpandWidth(true));

			// and this ones:
			if (GUI.GetNameOfFocusedControl()=="TermsFilter")
				mKeyToExplore = string.Empty;

Hope that helps,
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.

Search box keeps losing focus 1 month 2 weeks ago #2330

  • jimmyt3d
  • jimmyt3d's Avatar
  • Offline
  • Junior Member
  • Posts: 39
  • Thank you received: 1
  • Karma: 1
Hi Frank,

Many thanks for the quick fix, however the issue in the original post still occurs - I updated the bug description after the original post, maybe you didn't see this.
I added a video and more information to detail that this problem is not limited to happening just when a term is selected, but also happens when nothing is selected.
Please see video to see the issue which is still occurring in 2.7.0f2.
The administrator has disabled public write access.

Search box keeps losing focus 1 week 4 days ago #2395

  • jimmyt3d
  • jimmyt3d's Avatar
  • Offline
  • Junior Member
  • Posts: 39
  • Thank you received: 1
  • Karma: 1
Hi Frank, any news on a fix for this issue? I've now taken to typing what I want to search for externally and then copy/pasting it into the search box to get around the issue!
See my last comment.
The administrator has disabled public write access.

Search box keeps losing focus 1 week 3 days ago #2396

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 834
  • Thank you received: 181
  • Karma: 53
Hey!!
This bug has been haunting me a lot! It seems that having a TextField after a ScrollView list is not very well handled by unity because of how it manages the IDs of every UI element.
So, finally, today I was able to find a solution!!!



I added it to beta 2.8.0a4. Will be releasing that version as soon as I finish testing some other features I'm adding!

Hope that helps!
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
Last Edit: 1 week 3 days ago by Frank.
The administrator has disabled public write access.
The following user(s) said Thank You: jimmyt3d

Search box keeps losing focus 5 days 22 hours ago #2399

  • jimmyt3d
  • jimmyt3d's Avatar
  • Offline
  • Junior Member
  • Posts: 39
  • Thank you received: 1
  • Karma: 1
That's great, do you know when this update will hit the asset store?
I'm at a critical point in my project, so don't want to use a beta version at this stage.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.114 seconds
Colors