View Issue Details

IDProjectCategoryView StatusLast Update
0002609NoesisGUIUnity3Dpublic2023-07-04 19:15
Reportersfernandez Assigned Tojsantos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.2.1 
Target Version3.2.2Fixed in Version3.2.2 
Summary0002609: WebGL: TextBox and PasswordBox don't receive focus
DescriptionFrom forums post: https://www.noesisengine.com/forums/viewtopic.php?p=15630

TextBox or PasswordBox in login sample doesn't show the text caret when clicked. It doesn't work either if you try to move the focus with the Tab key.
Steps To ReproduceUnity 2022.2.5f1 + NoesisGUI 3.2.1

1. Create Unity project
2. Install NoesisGUI package
3. Import Login sample
4. Build and Run for WebGL platform
TagsNo tags attached.
PlatformAny

Activities

dmacd10@gmail.com

[email protected]

2023-06-29 00:38

reporter   ~0008571

Gentle bump? This is now a blocking issue for our app; we need text entry capabilities. Would love to have a workaround at the very least.
jsantos

jsantos

2023-07-04 19:15

manager   ~0008581

Fixed in 3.2.2

Method TouchKeyboard.Open (in NoesisUnity.cs) must be changed to

        public static void Open(UIElement focused_)
        {
            string text = "";
            TouchScreenKeyboardType keyboardType = TouchScreenKeyboardType.Default;
            bool multiline = false;
            bool secure = false;
            int characterLimit = 0;

            if (focused_ is FrameworkElement)
            {
                switch (((FrameworkElement)focused_).InputScope)
                {
                    case InputScope.Url:
                        keyboardType = TouchScreenKeyboardType.URL;
                        break;
                    case InputScope.Digits:
                    case InputScope.Number:
                    case InputScope.NumberFullWidth:
                        keyboardType = TouchScreenKeyboardType.NumbersAndPunctuation;
                        break;
                    case InputScope.TelephoneNumber:
                    case InputScope.TelephoneLocalNumber:
                        keyboardType = TouchScreenKeyboardType.PhonePad;
                        break;
                    case InputScope.AlphanumericFullWidth:
                    case InputScope.AlphanumericHalfWidth:
                        keyboardType = TouchScreenKeyboardType.NamePhonePad;
                        break;
                    case InputScope.EmailSmtpAddress:
                        keyboardType = TouchScreenKeyboardType.EmailAddress;
                        break;
                    case InputScope.RegularExpression:
                        keyboardType = TouchScreenKeyboardType.Search;
                        break;
                    default:
                        keyboardType = TouchScreenKeyboardType.Default;
                        break;
                }
            }

            TextBox textBox = focused_ as TextBox;
            PasswordBox passwordBox = focused_ as PasswordBox;

            if (textBox != null)
            {
                text = textBox.Text;
                multiline = textBox.TextWrapping == TextWrapping.Wrap && textBox.AcceptsReturn;
                characterLimit = textBox.MaxLength;
            }
            else if (passwordBox != null)
            {
                text = passwordBox.Password;
                secure = true;
            }

            TouchScreenKeyboard keyboard_;

          #if UNITY_2018_1_OR_NEWER
            keyboard_ = TouchScreenKeyboard.Open(text, keyboardType, true, multiline, secure, false, "", characterLimit);
          #else
            keyboard_ = TouchScreenKeyboard.Open(text, keyboardType, true, multiline, secure, false, "");
          #endif

            if (keyboard_.status == TouchScreenKeyboard.Status.Visible)
            {
                if (textBox != null)
                {
                    textBox.HideCaret();
                }
                else if (passwordBox != null)
                {
                    passwordBox.HideCaret();
                }

                keyboard = keyboard_;
                focused = focused_;
                undoString = text;
            }
        }

Issue History

Date Modified Username Field Change
2023-05-24 12:00 sfernandez New Issue
2023-05-24 12:00 sfernandez Assigned To => jsantos
2023-05-24 12:00 sfernandez Status new => assigned
2023-05-24 12:00 sfernandez Target Version => 3.2.2
2023-06-29 00:38 [email protected] Note Added: 0008571
2023-07-04 19:15 jsantos Status assigned => resolved
2023-07-04 19:15 jsantos Resolution open => fixed
2023-07-04 19:15 jsantos Fixed in Version => 3.2.2
2023-07-04 19:15 jsantos Note Added: 0008581