fix: Comment action not visible on mobile formatting toolbar

This commit is contained in:
Tom Moor
2024-06-01 16:39:32 -04:00
parent 938fd6ed2d
commit cb0f03d698
4 changed files with 31 additions and 22 deletions

View File

@@ -100,10 +100,10 @@ export default function SelectionToolbar(props: Props) {
const { view, commands } = useEditor();
const dictionary = useDictionary();
const menuRef = React.useRef<HTMLDivElement | null>(null);
const isActive = useIsActive(view.state);
const isMobile = useMobile();
const isActive = useIsActive(view.state) || isMobile;
const isDragging = useIsDragging();
const previousIsActive = usePrevious(isActive);
const isMobile = useMobile();
React.useEffect(() => {
// Trigger callbacks when the toolbar is opened or closed