Skip to content

fix(html-viewer): treat a collapsed live Range as dead so text annotations re-anchor - #4136

Closed
HaloXie wants to merge 2 commits into
backnotprop:mainfrom
cognirail:justin-main
Closed

HaloXie wants to merge 2 commits into
backnotprop:mainfrom
cognirail:justin-main

Conversation

@HaloXie

@HaloXie HaloXie commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Pages that detach and re-attach nodes (virtualized docs such as Feishu) collapse
the stored Range onto the still-connected parent. rangeAlive() saw connected
containers and kept the empty range, so the highlight vanished after scrolling
away and back and the text re-search never ran.

…tions re-anchor

Pages that detach and re-attach nodes (virtualized docs such as Feishu) collapse
the stored Range onto the still-connected parent. rangeAlive() saw connected
containers and kept the empty range, so the highlight vanished after scrolling
away and back and the text re-search never ran.
… on scroll-to

Virtualized pages (e.g. Feishu docs) only build blocks near the viewport, so a
far annotation has no DOM to find and scroll-to silently did nothing. When the
text search misses, page the largest scroller one screen at a time until the
mark renders; give up at the bottom and restore the original position. A newer
scroll-to cancels an older seek.
@HaloXie

HaloXie commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #4138 (same fix, opened from a dedicated branch).

@HaloXie HaloXie closed this Nov 27, 2026
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.

1 participant