@@ -148,9 +148,11 @@ const applyFolderCellCentering = (cell, rowHeight = 0) => {
148148 return false ;
149149 }
150150
151+ const row = cell . parentElement ;
152+ const isPreviewRow = rowHasFolderPreview ( row ) ;
151153 const height = Number . isFinite ( rowHeight ) && rowHeight > 0 ? Math . round ( rowHeight ) : 0 ;
152154 cell . style . setProperty ( 'vertical-align' , 'middle' , 'important' ) ;
153- cell . style . setProperty ( 'position' , 'static' , 'important' ) ;
155+ cell . style . setProperty ( 'position' , isPreviewRow ? 'static' : 'relative ', 'important' ) ;
154156 cell . style . setProperty ( 'display' , 'table-cell' , 'important' ) ;
155157 cell . style . setProperty ( 'padding-top' , '0px' , 'important' ) ;
156158 cell . style . setProperty ( 'padding-bottom' , '0px' , 'important' ) ;
@@ -160,11 +162,11 @@ const applyFolderCellCentering = (cell, rowHeight = 0) => {
160162 cell . style . removeProperty ( 'height' ) ;
161163 }
162164
163- sub . style . setProperty ( 'position' , 'relative' , 'important' ) ;
164- sub . style . setProperty ( 'top' , 'auto' , 'important' ) ;
165- sub . style . setProperty ( 'left' , 'auto' , 'important' ) ;
166- sub . style . setProperty ( 'right' , 'auto' , 'important' ) ;
167- sub . style . setProperty ( 'transform' , 'none' , 'important' ) ;
165+ sub . style . setProperty ( 'position' , isPreviewRow ? 'relative' : 'absolute ', 'important' ) ;
166+ sub . style . setProperty ( 'top' , isPreviewRow ? 'auto' : '50% ', 'important' ) ;
167+ sub . style . setProperty ( 'left' , isPreviewRow ? 'auto' : '8px ', 'important' ) ;
168+ sub . style . setProperty ( 'right' , isPreviewRow ? 'auto' : '8px ', 'important' ) ;
169+ sub . style . setProperty ( 'transform' , isPreviewRow ? 'none' : 'translateY(-50%) ', 'important' ) ;
168170 sub . style . setProperty ( 'display' , 'flex' , 'important' ) ;
169171 sub . style . setProperty ( 'align-items' , 'center' , 'important' ) ;
170172 sub . style . setProperty ( 'min-height' , '0' , 'important' ) ;
0 commit comments