Skip to content

Conversation

timvandermeij
Copy link
Contributor

If the document changes the comment state from the old document should be replaced with that of the new document. To do this the comment manager is destroyed, but the corresponding comment sidebar wasn't destroyed yet, which resulted in the comment state from the old document still being visible for the new document.

This commit fixes the issue by hiding the comment sidebar if the comment manager is destroyed. Note that hiding the comment sidebar effectively destroys all its state, and we already set the annotation mode to "none" on document change so we don't want to keep showing the comment sidebar anyway.

Fixes #20219.

If the document changes the comment state from the old document should
be replaced with that of the new document. To do this the comment
manager is destroyed, but the corresponding comment sidebar wasn't
destroyed yet, which resulted in the comment state from the old document
still being visible for the new document.

This commit fixes the issue by hiding the comment sidebar if the comment
manager is destroyed. Note that hiding the comment sidebar effectively
destroys all its state, and we already set the annotation mode to "none"
on document change so we don't want to keep showing the comment sidebar
anyway.
@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/7f3ee0e1ab68a71/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/7f3ee0e1ab68a71/output.txt

Total script time: 0.95 mins

Published

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@timvandermeij timvandermeij merged commit 9855d85 into mozilla:master Aug 31, 2025
7 checks passed
@timvandermeij timvandermeij deleted the editor-hint-bugfix branch August 31, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Comment sidebar is not cleared on document switch
3 participants