mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
fix: Prevent comment sidebar from opening unexpectedly (#11845)
* fix: Prevent comment sidebar from opening unexpectedly Guard against stale cross-document focused comments opening the sidebar by checking the comment's documentId matches the current document. Also stop restoring rightSidebar state from localStorage on app load so the sidebar always starts closed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: Restore rightSidebar persistence on page reload Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -93,7 +93,7 @@ function DocumentEditor(props: Props, ref: React.RefObject<any>) {
|
||||
}, [ref]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (focusedComment) {
|
||||
if (focusedComment && focusedComment.documentId === document.id) {
|
||||
const viewingResolved = params.get("resolved") === "";
|
||||
if (
|
||||
(focusedComment.isResolved && !viewingResolved) ||
|
||||
|
||||
Reference in New Issue
Block a user