Skip to content

fix: stabilize markdown table search and selection#137

Open
2391384896 wants to merge 4 commits into
mainfrom
fix/table-search-highlight
Open

fix: stabilize markdown table search and selection#137
2391384896 wants to merge 4 commits into
mainfrom
fix/table-search-highlight

Conversation

@2391384896

@2391384896 2391384896 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add source offset metadata to rendered table cells and mirror CodeMirror search matches into table live-preview cells through CSS Custom Highlight ranges.
  • Keep table cell DOM/focus stable while typing after a cell is activated, including lower rows in long tables.
  • Treat same-cell pointer drags as native text selection so selecting Float inside Floatboat, P inside P1, or Kevin inside Kevin Stratvert does not become whole-cell editing/selection.
  • Defer table cell document writes until focus leaves the table, keep IME composition intermediate text out of the Markdown document, and preserve the edited row's viewport position after blur commit.

Verification

  • pnpm exec vitest run packages/plugin-search/test/plugin-search.test.ts → pass (30 tests)
  • pnpm exec vitest run packages/core/test/live-preview.test.ts → pass (69 tests)
  • pnpm typecheck → pass
  • pnpm --filter @floatboat/nexus-core build → pass
  • pnpm --filter @floatboat/nexus-plugin-search build → pass
  • git diff --check → pass
  • AoE Electron runtime check via CDP → pass: long table row typed ABC without DOM/focus loss; Float partial selection stayed partial; Cmd+F table search selected SearchNeedle070.
  • AoE Electron runtime check via CDP on /Users/zhenyu/Downloads/Floatboat table ime repro.md → pass: 第 38 行 | | aa | ... | nnasaaan | ... | 首格 composition 输入 你好 时中间态 n 不写入文档、不失焦;blur 后目标行仍停在表格可见区域,未跳到 评论样本摘录

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants