diff --git a/Source/Engine/UI/GUI/Common/RichTextBoxBase.cs b/Source/Engine/UI/GUI/Common/RichTextBoxBase.cs index bfddc966c..4f9e20d5d 100644 --- a/Source/Engine/UI/GUI/Common/RichTextBoxBase.cs +++ b/Source/Engine/UI/GUI/Common/RichTextBoxBase.cs @@ -207,7 +207,7 @@ namespace FlaxEngine.GUI { // Select the word under the mouse int textLength = TextLength; - if (textLength != 0) + if (textLength != 0 && IsSelectable) { var hitPos = CharIndexAtPoint(ref location); int spaceLoc = _text.LastIndexOfAny(Separators, hitPos - 2); diff --git a/Source/Engine/UI/GUI/Common/TextBox.cs b/Source/Engine/UI/GUI/Common/TextBox.cs index 77ca2a258..e11e7c787 100644 --- a/Source/Engine/UI/GUI/Common/TextBox.cs +++ b/Source/Engine/UI/GUI/Common/TextBox.cs @@ -234,7 +234,10 @@ namespace FlaxEngine.GUI /// public override bool OnMouseDoubleClick(Float2 location, MouseButton button) { - SelectAll(); + if (IsSelectable) + { + SelectAll(); + } return base.OnMouseDoubleClick(location, button); }