Skip to content

Commit

Permalink
fix: hover controls position
Browse files Browse the repository at this point in the history
  • Loading branch information
qinluhe committed Dec 30, 2024
1 parent 256d015 commit 76c2ce9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getScrollParent } from '@/components/global-comment/utils';
import React, { useCallback, useEffect, useRef } from 'react';
import { ReactEditor, useReadOnly, useSlateStatic } from 'slate-react';

function TableContainer({ blockId, readSummary, children, paddingLeft = 0 }: {
function TableContainer ({ blockId, readSummary, children, paddingLeft = 0 }: {
blockId: string;
readSummary?: boolean;
children?: React.ReactNode;
Expand Down Expand Up @@ -99,12 +99,12 @@ function TableContainer({ blockId, readSummary, children, paddingLeft = 0 }: {
<div
ref={controlRef}
style={{
left: (left - 64) + 'px',
left: (offsetLeftRef.current - 64) + 'px',
visibility: showControl ? 'visible' : 'hidden',
zIndex: showControl ? 10 : -1,
pointerEvents: showControl ? 'auto' : 'none',
}}

contentEditable={false}
className={'absolute z-[10] w-[64px] top-2 block pr-1'}
>
Expand Down

0 comments on commit 76c2ce9

Please sign in to comment.