diff --git a/src/controls/richText/RichText.tsx b/src/controls/richText/RichText.tsx index f8af80d24..859aa0b08 100644 --- a/src/controls/richText/RichText.tsx +++ b/src/controls/richText/RichText.tsx @@ -689,7 +689,7 @@ id="DropDownStyles" quill.deleteText(range.index, range.length); } - if (cursorPosition) { + if (cursorPosition > -1) { const textToInsert: string = this.state.insertUrlText !== undefined ? this.state.insertUrlText : this.state.insertUrl; const urlToInsert: string = this.state.insertUrl; quill.insertText(cursorPosition, textToInsert);