Merge pull request #14712 from overleaf/mj-table-adjustbox

[visual] Disable caption dropdown when tabular is wrapped in command

GitOrigin-RevId: 08131d27e8bb4cb99eee3060435084f671bc3dd6
This commit is contained in:
Mathias Jakobsen
2023-09-08 08:04:23 +00:00
committed by Copybot
parent c5cb344178
commit 0d7730f37a
10 changed files with 92 additions and 20 deletions
@@ -278,3 +278,11 @@ export const minimumListDepthForSelection = (state: EditorState) => {
}
return Math.min(...depths)
}
export const isDirectChildOfEnvironment = (
child?: SyntaxNode | null,
ancestor?: SyntaxNode | null
) => {
const possiblyAncestor = child?.parent?.parent?.parent // Text → Content → Environment
return ancestor === possiblyAncestor
}