Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/MahApps.Metro/Controls/NumericUpDown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,9 +1170,7 @@ protected void OnPreviewTextInput(object sender, TextCompositionEventArgs e)
var textBox = (TextBox)sender;
var fullText = textBox.Text.Remove(textBox.SelectionStart, textBox.SelectionLength).Insert(textBox.CaretIndex, e.Text);
var textIsValid = this.ValidateText(fullText, out var convertedValue);
// Value must be valid and not coerced
var coerceValue = CoerceValue(this, convertedValue as double?);
e.Handled = !textIsValid || !coerceValue.isValid;
e.Handled = !textIsValid;
this.manualChange = !e.Handled;
}

Expand Down
Loading