File tree Expand file tree Collapse file tree
tests/Avalonia.Controls.UnitTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -431,6 +431,7 @@ public TextBox()
431431 _undoRedoHelper = new UndoRedoHelper < UndoRedoState > ( this ) ;
432432 _selectedTextChangesMadeSinceLastUndoSnapshot = 0 ;
433433 _hasDoneSnapshotOnce = false ;
434+ UpdateCommandStates ( ) ;
434435 UpdatePseudoclasses ( ) ;
435436 }
436437
Original file line number Diff line number Diff line change @@ -1549,6 +1549,19 @@ public void Setting_IsUndoEnabled_To_False_Clears_Undo_Redo()
15491549 }
15501550 }
15511551
1552+ [ Fact ]
1553+ public void Empty_TextBox_Initializes_Clipboard_Command_States ( )
1554+ {
1555+ using ( UnitTestApplication . Start ( Services ) )
1556+ {
1557+ var tb = new TextBox ( ) ;
1558+
1559+ Assert . False ( tb . CanCopy ) ;
1560+ Assert . False ( tb . CanCut ) ;
1561+ Assert . True ( tb . CanPaste ) ;
1562+ }
1563+ }
1564+
15521565 [ Fact ]
15531566 public void Command_States_Update_When_ReadOnly_And_PasswordChar_Change ( )
15541567 {
You can’t perform that action at this time.
0 commit comments