Browse Source

Merge branch 'master' into fixes/1448

Steven Kirk 7 năm trước cách đây
mục cha
commit
0ebd79dbce

+ 5 - 2
src/Avalonia.Controls/TextBox.cs

@@ -275,8 +275,11 @@ namespace Avalonia.Controls
 
 
         protected override void OnTextInput(TextInputEventArgs e)
         protected override void OnTextInput(TextInputEventArgs e)
         {
         {
-            HandleTextInput(e.Text);
-            e.Handled = true;
+            if (!e.Handled)
+            {
+                HandleTextInput(e.Text);
+                e.Handled = true;
+            }
         }
         }
 
 
         private void HandleTextInput(string input)
         private void HandleTextInput(string input)

+ 2 - 1
src/Avalonia.Controls/Utils/UndoRedoHelper.cs

@@ -59,7 +59,7 @@ namespace Avalonia.Controls.Utils
 
 
         public void UpdateLastState()
         public void UpdateLastState()
         {
         {
-            _states.Last.Value = _host.UndoRedoState;
+            UpdateLastState(_host.UndoRedoState);
         }
         }
 
 
         public void DiscardRedo()
         public void DiscardRedo()
@@ -94,6 +94,7 @@ namespace Avalonia.Controls.Utils
         public void Clear()
         public void Clear()
         {
         {
             _states.Clear();
             _states.Clear();
+            _currentNode = null;
         }
         }
 
 
         bool WeakTimer.IWeakTimerSubscriber.Tick()
         bool WeakTimer.IWeakTimerSubscriber.Tick()