Search box keeps losing focus

More
7 years 4 months ago - 7 years 4 months ago #2328 by jimmyt3d
*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: 7 years 4 months ago by jimmyt3d.

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #2329 by Frank
Replied by Frank on topic Search box keeps losing focus
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

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #2330 by jimmyt3d
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.

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #2395 by jimmyt3d
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.

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago - 7 years 3 months ago #2396 by Frank
Replied by Frank on topic Search box keeps losing focus
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
Attachments:
Last edit: 7 years 3 months ago by Frank.
The following user(s) said Thank You: jimmyt3d

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #2399 by jimmyt3d
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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.193 seconds
Template by JoomlaShine