Browse Source

Fixed readonly issue

Tig 1 year ago
parent
commit
23394c10a2
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Terminal.Gui/Views/TextView.cs

+ 6 - 1
Terminal.Gui/Views/TextView.cs

@@ -6067,7 +6067,12 @@ public class TextView : View
     {
     {
         ResetColumnTrack ();
         ResetColumnTrack ();
 
 
-        if (!AllowsReturn || _isReadOnly)
+        if (_isReadOnly)
+        {
+            return false;
+        }
+
+        if (!AllowsReturn)
         {
         {
             // By Default pressing ENTER should be ignored (OnAccept will return false or null). Only cancel if the
             // By Default pressing ENTER should be ignored (OnAccept will return false or null). Only cancel if the
             // event was fired and set Cancel = true.
             // event was fired and set Cancel = true.