diff --git a/maui/src/NumericEntry/SfNumericEntry.Methods.cs b/maui/src/NumericEntry/SfNumericEntry.Methods.cs index a99784bb..910cba14 100644 --- a/maui/src/NumericEntry/SfNumericEntry.Methods.cs +++ b/maui/src/NumericEntry/SfNumericEntry.Methods.cs @@ -1904,7 +1904,7 @@ string GetSelectedText(int caretPosition) #elif ANDROID return _previousText != null ? _previousText.Substring(caretPosition, _selectionLength) : string.Empty; #elif MACCATALYST || IOS - return _textBox != null && _previousText != null ? _previousText.Substring(caretPosition, _textBox.SelectionLength) : string.Empty; + return _textBox != null && _previousText != null && _textBox.SelectionLength + caretPosition <= _previousText.Length ? _previousText.Substring(caretPosition, _textBox.SelectionLength) : string.Empty; #else return string.Empty; #endif