1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-26 00:27:28 +02:00

fix issue where inline voids can no longer be selected (#3572)

* fix issue where inline voids can no longer be selected by allowing the zero width space to be an editable target

Co-authored-by: damareyoh <chackerman@wsu.edu>
This commit is contained in:
Cameron Ackerman
2020-04-07 09:14:57 -07:00
committed by GitHub
parent 1d7ab97429
commit 54b9b63f04

View File

@@ -174,7 +174,9 @@ export const ReactEditor = {
return (
targetEl.closest(`[data-slate-editor]`) === editorEl &&
(!editable || targetEl.isContentEditable)
(!editable ||
targetEl.isContentEditable ||
!!targetEl.getAttribute('data-slate-zero-width'))
)
},