test(editor): address PR #147 review — reflow tests, code-block guard, a11y
Resolve the pre-merge review items for the #146 NodeView content-first fix: - Export collectScrollAncestors/reflowAfterPaste and add editor-paste-handler unit tests covering ancestor selection (overlay included, non-overflowing auto excluded, X axis), the scrollHeight>clientHeight gate, scrollingElement dedup, the docEl==null branch, and the double-rAF nudge. - Extend the structural guard with CodeBlockView and merge the two it.each blocks into one document-order assertion (handles the <pre> nesting where the contentDOM is not the literal first child). - Simplify the post-paste nudge to a single scrollTo(scrollLeft, scrollTop). - Document that the post-paste reflow runs on every paste path intentionally, and cross-reference the two #146 mitigations in both fixes. - a11y: aria-hidden the decorative footnotes heading and number marker, and label the footnotes list via role="group" + aria-label so the visual reorder does not break screen-reader reading order (WCAG 1.3.2). - CHANGELOG: add a Fixed entry noting the caret fix is macOS-verified manually. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,8 @@ export default function CodeBlockView(props: NodeViewProps) {
|
||||
menu is rendered after it and lifted back above visually via flex
|
||||
`order: -1` (the `.codeBlock` wrapper is a flex column — see
|
||||
code-block.module.css). It stays fully in flow as a full-width row
|
||||
above the code: no overlay/absolute positioning. */}
|
||||
above the code: no overlay/absolute positioning. The second #146
|
||||
mitigation lives in editor-paste-handler.tsx (reflowAfterPaste). */}
|
||||
<pre
|
||||
spellCheck="false"
|
||||
hidden={
|
||||
|
||||
Reference in New Issue
Block a user