Skip to content

Commit 031c7f2

Browse files
LeoYuanliujuping
authored andcommitted
fix: fix outline-pane invisible occasionally when dragging tree node
1 parent 7eecb39 commit 031c7f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/editor-skeleton/src/layouts/left-float-pane.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
1616
const { area } = this.props;
1717
const triggerClose = (e: any) => {
1818
if (!area.visible) return;
19+
// 当 MouseEvent 的 target 为「插入占位符」时,不关闭当前 panel
20+
if (e.originalEvent?.target?.classList.contains('insertion')) return;
1921
// 假如当前操作 target 祖先节点中有属性 data-keep-visible-while-dragging="true" 代表该 target 所属 panel
2022
// 不希望 target 在 panel 范围内拖拽时关闭 panel
2123
const panelElem = e.originalEvent?.target.closest('div[data-keep-visible-while-dragging="true"]');

0 commit comments

Comments
 (0)