in src/component/selection/getDraftEditorSelectionWithNodes.js [109:130]
selectionState: getUpdatedSelectionState(
editorState,
anchorPoint.key,
anchorPoint.offset,
focusPoint.key,
focusPoint.offset,
),
needsRecovery,
};
}
/**
* Identify the first leaf descendant for the given node.
*/
function getFirstLeaf(node: any): Node {
while (
node.firstChild &&
// data-blocks has no offset
((isElement(node.firstChild) &&
(node.firstChild: Element).getAttribute('data-blocks') === 'true') ||
getSelectionOffsetKeyForNode(node.firstChild))
) {