mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-08 16:26:29 +02:00
Fixed triple click workaround breaking void elements selection (#5451)
* Fixed tripple click workaround breaking void selection * Add changesets * Fix ts error * Make code style more consistent
This commit is contained in:
@@ -869,7 +869,8 @@ export const ReactEditor: ReactEditorInterface = {
|
||||
// will cause `toSlatePoint` to throw an error. (2023/03/07)
|
||||
if (
|
||||
'getAttribute' in focusNode &&
|
||||
(focusNode as HTMLElement).getAttribute('contenteditable') === 'false'
|
||||
(focusNode as HTMLElement).getAttribute('contenteditable') === 'false' &&
|
||||
(focusNode as HTMLElement).getAttribute('data-slate-void') !== 'true'
|
||||
) {
|
||||
focusNode = anchorNode
|
||||
focusOffset = anchorNode.textContent?.length || 0
|
||||
|
Reference in New Issue
Block a user