Skip to content

Commit 6a08d55

Browse files
Let DataGridCell handle mouse events itself when already editing (#2821)
1 parent e6f81bf commit 6a08d55

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

MaterialDesignThemes.Wpf/DataGridAssist.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ private static void AllowDirectEditWithoutFocus(object sender, MouseButtonEventA
242242
{
243243
return;
244244
}
245+
if (dataGridCell.IsEditing)
246+
{
247+
// If the cell is already being edited, we let the cell itself handle the mouse event
248+
return;
249+
}
245250

246251
dataGrid.CurrentCell = new DataGridCellInfo(dataGridCell);
247252
dataGrid.BeginEdit();

0 commit comments

Comments
 (0)