event.preventDefault() call invalid autocorrect | Safari

Found a problem with Webkit. If in the safari browser, in the contenteditable field, using js, interrupt the keydown event and implement the same functionality programmatically, then the autoreplacement starts to produce incorrect results.

As you can see in the image below, the content has been programmatically removed, but the autocorrect outputs incorrect options.