Restore empty table selection, closes #5581

This commit is contained in:
Tom Moor
2023-07-19 17:46:14 -04:00
parent 3c6e2aaac6
commit b60e46a961

View File

@@ -1,3 +1,4 @@
import { some } from "lodash";
import { EditorState, NodeSelection, TextSelection } from "prosemirror-state";
import * as React from "react";
import createAndInsertLink from "@shared/editor/commands/createAndInsertLink";
@@ -78,7 +79,10 @@ function useIsActive(state: EditorState) {
}
const slice = selection.content();
return !!slice.content.textBetween(0, slice.content.size);
const fragment = slice.content;
const nodes = (fragment as any).content;
return some(nodes, (n) => n.content.size);
}
function useIsDragging() {