onaluf / fate

Flexible Angular Text Editor
MIT License
37 stars 14 forks source link

Error when erasing a mouse-selected text #85

Closed leandro-hermes closed 3 years ago

leandro-hermes commented 4 years ago

When I select all the text with the mouse cursor and then press Backspace, the following erros occurs:

VM7873:37 TypeError: Cannot read property 'commonAncestorContainer' of undefined
    at HTMLDivElement.<anonymous> (fate-editor.js:979)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:41632)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480)
    at invokeTask (zone-evergreen.js:1621)
    at HTMLDivElement.globalZoneAwareCallback (zone-evergreen.js:1647)

I'm using version 2.3.4

leandro-hermes commented 4 years ago

Deep testing, I noticed this occurs when I drag selection outside the target, causing component to not detect mouseup event and assing selectionRange

onaluf commented 3 years ago

:tada: This issue has been resolved in version 2.3.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: