layout: fix dragbar flickering when opening a book (#2177)

This commit is contained in:
Huang Xin
2025-10-06 11:52:36 +08:00
committed by GitHub
parent 788e08a75a
commit 173aa0fcd1
3 changed files with 4 additions and 3 deletions
@@ -230,7 +230,7 @@ const Notebook: React.FC = ({}) => {
}
`}</style>
<div
className='drag-bar absolute -left-2 top-0 h-full w-0.5 cursor-col-resize bg-transparent p-2'
className='drag-bar bg-base-100 absolute -left-2 top-0 h-full w-0.5 cursor-col-resize p-2'
role='slider'
tabIndex={0}
aria-label={_('Resize Notebook')}
@@ -293,7 +293,7 @@ const SideBar: React.FC<{
)}
<div
className={clsx(
'drag-bar absolute -right-2 top-0 h-full w-0.5 cursor-col-resize bg-transparent p-1',
'drag-bar bg-base-100 absolute -right-2 top-0 h-full w-0.5 cursor-col-resize p-1',
isMobile && 'hidden',
)}
role='slider'
@@ -137,6 +137,7 @@ export const StaticListRow: React.FC<ListRowProps> = ({
'border-base-300 w-full border-b sm:border-none',
'pe-4 ps-2 pt-[1px] sm:pe-2',
)}
title={flatItem.item.label || ''}
>
<TOCItemView
bookKey={bookKey}
@@ -166,7 +167,7 @@ export const VirtualListRow: React.FC<
const flatItem = flatItems[index];
return (
<div style={style}>
<div style={style} title={flatItem.item.label || ''}>
<StaticListRow
bookKey={bookKey}
flatItem={flatItem}