File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export function Comments( {
170170 const offsets = { } ;
171171
172172 if ( ! isFloating ) {
173- return offsets ;
173+ return { offsets, minHeight : 0 } ;
174174 }
175175
176176 // Find the index of the selected thread.
@@ -188,7 +188,7 @@ export function Comments( {
188188 ! selectedThreadData ||
189189 ! blockRefs [ selectedThreadData . id ]
190190 ) {
191- return offsets ;
191+ return { offsets, minHeight : 0 } ;
192192 }
193193
194194 let blockElement = blockRefs [ selectedThreadData . id ] ;
@@ -289,15 +289,14 @@ export function Comments( {
289289 lastThreadTop + lastThreadHeight + lastThreadOffset + 32 ;
290290 }
291291
292- // Ensure the editor has enough height to scroll to all notes.
293- setCanvasMinHeight ( editorMinHeight ) ;
294-
295- return offsets ;
292+ return { offsets, minHeight : editorMinHeight } ;
296293 } ;
297- const newOffsets = calculateAllOffsets ( ) ;
294+ const { offsets : newOffsets , minHeight } = calculateAllOffsets ( ) ;
298295 if ( Object . keys ( newOffsets ) . length > 0 ) {
299296 setBoardOffsets ( newOffsets ) ;
300297 }
298+ // Ensure the editor has enough height to scroll to all notes.
299+ setCanvasMinHeight ( minHeight ) ;
301300 } , [
302301 heights ,
303302 blockRefs ,
You can’t perform that action at this time.
0 commit comments