diff --git a/src/MarkdownTextInput.web.tsx b/src/MarkdownTextInput.web.tsx index 7581e9a6..a73a1287 100644 --- a/src/MarkdownTextInput.web.tsx +++ b/src/MarkdownTextInput.web.tsx @@ -418,7 +418,7 @@ const MarkdownTextInput = React.forwardRef( if (inputType === 'deleteContentBackward') { // When the user does a backspace delete he expects the content before the cursor to be removed. // For this the start value needs to be adjusted (its as if the selection was before the text that we want to delete) - start -= before; + start = Math.max(start - before, 0); } event.nativeEvent.count = count;