Skip to content

fix(live-preview): release LiveHTMLDocument's doc ref when file is deleted - #3111

Merged
abose merged 2 commits into
mainfrom
ai
Aug 18, 2026
Merged

fix(live-preview): release LiveHTMLDocument's doc ref when file is deleted#3111
abose merged 2 commits into
mainfrom
ai

Conversation

@abose

@abose abose commented Aug 18, 2026

Copy link
Copy Markdown
Member

LiveHTMLDocument holds its own addRef() on the doc it's previewing, on top of any editor's ref, but only released it from close() - which is driven by the live preview session lifecycle, not by the file disappearing. Deleting the actively-previewed HTML file from the file tree left that ref dangling forever.

Mirrors LiveCSSDocument's existing "deleted" handling, which already does this correctly.

abose added 2 commits August 18, 2026 14:56
…leted

LiveHTMLDocument holds its own addRef() on the doc it's previewing, on
top of any editor's ref, but only released it from close() - which is
driven by the live preview session lifecycle, not by the file
disappearing. Deleting the actively-previewed HTML file from the file
tree left that ref dangling forever.

Mirrors LiveCSSDocument's existing "deleted" handling, which already
does this correctly.
@sonarqubecloud

Copy link
Copy Markdown

@abose
abose merged commit 0a0bd26 into main Aug 18, 2026
12 of 21 checks passed
@abose
abose deleted the ai branch August 18, 2026 13:09
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