Skip to content

Commit 5e581e9

Browse files
authored
fix: hover controls position (#7093)
1 parent 256d015 commit 5e581e9

File tree

1 file changed

+3
-3
lines changed
  • frontend/appflowy_web_app/src/components/editor/components/table-container

1 file changed

+3
-3
lines changed

frontend/appflowy_web_app/src/components/editor/components/table-container/TableContainer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getScrollParent } from '@/components/global-comment/utils';
33
import React, { useCallback, useEffect, useRef } from 'react';
44
import { ReactEditor, useReadOnly, useSlateStatic } from 'slate-react';
55

6-
function TableContainer({ blockId, readSummary, children, paddingLeft = 0 }: {
6+
function TableContainer ({ blockId, readSummary, children, paddingLeft = 0 }: {
77
blockId: string;
88
readSummary?: boolean;
99
children?: React.ReactNode;
@@ -99,12 +99,12 @@ function TableContainer({ blockId, readSummary, children, paddingLeft = 0 }: {
9999
<div
100100
ref={controlRef}
101101
style={{
102-
left: (left - 64) + 'px',
102+
left: (offsetLeftRef.current - 64) + 'px',
103103
visibility: showControl ? 'visible' : 'hidden',
104104
zIndex: showControl ? 10 : -1,
105105
pointerEvents: showControl ? 'auto' : 'none',
106106
}}
107-
107+
108108
contentEditable={false}
109109
className={'absolute z-[10] w-[64px] top-2 block pr-1'}
110110
>

0 commit comments

Comments
 (0)