Browse Source

Fixed readonly issue

Tig 1 năm trước cách đây
mục cha
commit
23394c10a2
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      Terminal.Gui/Views/TextView.cs

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

@@ -6067,7 +6067,12 @@ public class TextView : View
     {
         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
             // event was fired and set Cancel = true.