mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-03-14 10:19:43 +01:00
* Fix bug: setting selection from contentEditable:false element causes crash Fixes https://github.com/ianstormtaylor/slate/issues/4583 When clicking some text in a `contentEditable:false` element, if the handler for this sets the selection, Slate crashes. Slate tries to find a Slate range for the text that was clicked on, but there is no such range, because the text is inside a `contentEditable:false` element. Slate seems to be making a bad assumption that the current DOM selection necessarily corresponds to a Slate range, but this is not the case if the user just clicked into an element with `contentEditable: false`. To fix this, I changed `exactMatch: false` to `exactMatch: true`, which seems to mean "fail gracefully if there is no exact match". * changeset * Revert "Fix bug: setting selection from contentEditable:false element causes crash" This reverts commit 71234284cd454993b139ce065a9ab2db431abce8. * Unconflate exactMatch flag: add suppressThrow flag for separate behavior * Fix bug: setting selection from contentEditable:false element causes crash Fixes #4583 When clicking some text in a `contentEditable:false` element, if the handler for this sets the selection, Slate crashes. Slate tries to find a Slate range for the text that was clicked on, but there is no such range, because the text is inside a `contentEditable:false` element. Slate seems to be making a bad assumption that the current DOM selection necessarily corresponds to a Slate range, but this is not the case if the user just clicked into an element with `contentEditable: false`.
Changesets
Hello and welcome! This folder has been automatically generated by @changesets/cli
, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it in our repository
We have a quick list of common questions to get you started engaging with this project in our documentation