diff --git a/CHANGELOG.md b/CHANGELOG.md index 43255596..b843e912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 cut from 300 to 100 on upgrade. Set `SHARE_AI_WORKSPACE_MAX_PER_HOUR` to keep the previous limit. (#62) +### Fixed + +- **Editor: caret/selection landed on the wrong line when clicking inside code + blocks and footnotes.** The affected NodeViews rendered their non-editable + chrome (language menu, footnotes heading, footnote number marker) before the + editable content, so the browser's click hit-testing missed the contentDOM and + snapped the caret to a previous node. Content now renders first in the DOM + (chrome is lifted back into place via CSS flex `order`), and scroll containers + are nudged after a paste to refresh stale hit-testing geometry. The caret + symptom is macOS-specific and was confirmed manually on macOS; the automated + guard pins the DOM-order invariant, not the caret behavior itself. (#146, #147) + ## [0.93.0] - 2026-06-21 This release builds on the 0.91.0 AI foundation: admin-defined AI agent roles, diff --git a/apps/client/src/features/editor/components/code-block/code-block-view.tsx b/apps/client/src/features/editor/components/code-block/code-block-view.tsx index 1b67ddf6..1930f182 100644 --- a/apps/client/src/features/editor/components/code-block/code-block-view.tsx +++ b/apps/client/src/features/editor/components/code-block/code-block-view.tsx @@ -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). */}