Skip to content

Commit 1cbda7f

Browse files
committed
Fix flickering when hasInitializedLocations gets toggled on and off
1 parent c284b57 commit 1cbda7f

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

packages/superdoc/src/SuperDoc.vue

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ watch(getFloatingComments, () => {
581581
</div>
582582
583583
<div class="superdoc__right-sidebar right-sidebar" v-if="showCommentsSidebar">
584-
585584
<CommentDialog
586585
v-if="pendingComment"
587586
:comment="pendingComment"
@@ -590,13 +589,14 @@ watch(getFloatingComments, () => {
590589
v-click-outside="cancelPendingComment"
591590
/>
592591
593-
<FloatingComments
594-
v-if="hasInitializedLocations && getFloatingComments.length > 0"
595-
class="floating-comments"
596-
v-for="doc in documentsWithConverations"
597-
:parent="layers"
598-
:current-document="doc"
599-
/>
592+
<div class="floating-comments" v-if="!isCommentsListVisible">
593+
<FloatingComments
594+
v-if="hasInitializedLocations && getFloatingComments.length > 0"
595+
v-for="doc in documentsWithConverations"
596+
:parent="layers"
597+
:current-document="doc"
598+
/>
599+
</div>
600600
</div>
601601
</div>
602602
</template>
@@ -606,6 +606,10 @@ watch(getFloatingComments, () => {
606606
display: flex;
607607
}
608608
609+
.floating-comments {
610+
min-width: 300px;
611+
}
612+
609613
.superdoc--with-sidebar { /* */ }
610614
611615
.superdoc__layers {
@@ -645,6 +649,7 @@ watch(getFloatingComments, () => {
645649
646650
.superdoc__right-sidebar {
647651
width: 320px;
652+
min-width: 320px;
648653
padding: 0 10px;
649654
min-height: 100%;
650655
position: relative;

0 commit comments

Comments
 (0)