mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 02:12:56 +00:00
fix: fix left-pane cant hidden when iframe click
This commit is contained in:
parent
8414425740
commit
412cb16628
@ -4,6 +4,7 @@ import { observer, Focusable } from '@alilc/lowcode-editor-core';
|
||||
import { Area } from '../area';
|
||||
import { Panel } from '../widget/panel';
|
||||
import { PanelConfig } from '../types';
|
||||
import { IPublicApiProject } from '@alilc/lowcode-types';
|
||||
|
||||
@observer
|
||||
export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, Panel> }> {
|
||||
@ -31,6 +32,8 @@ export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, P
|
||||
area.skeleton.editor.removeListener('designer.drag', triggerClose);
|
||||
};
|
||||
|
||||
const project: IPublicApiProject | undefined = area.skeleton.editor.get('project');
|
||||
|
||||
this.focusing = area.skeleton.focusTracker.create({
|
||||
range: (e) => {
|
||||
const target = e.target as HTMLElement;
|
||||
@ -44,6 +47,9 @@ export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, P
|
||||
if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) {
|
||||
return false;
|
||||
}
|
||||
if (project?.simulatorHost?.contentWindow?.document.documentElement.contains(target)) {
|
||||
return false;
|
||||
}
|
||||
// 点击设置区
|
||||
if (document.querySelector('.lc-right-area')?.contains(target)) {
|
||||
return false;
|
||||
|
||||
@ -2,6 +2,7 @@ import { Component, Fragment } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { observer, Focusable } from '@alilc/lowcode-editor-core';
|
||||
import { Area, Panel } from '@alilc/lowcode-editor-skeleton';
|
||||
import { IPublicApiProject } from '@alilc/lowcode-types';
|
||||
|
||||
@observer
|
||||
export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }> {
|
||||
@ -29,6 +30,8 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
|
||||
area.skeleton.editor.removeListener('designer.drag', triggerClose);
|
||||
};
|
||||
|
||||
const project: IPublicApiProject | undefined = area.skeleton.editor.get('project');
|
||||
|
||||
this.focusing = area.skeleton.focusTracker.create({
|
||||
range: (e) => {
|
||||
const target = e.target as HTMLElement;
|
||||
@ -42,6 +45,9 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
|
||||
if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) {
|
||||
return false;
|
||||
}
|
||||
if (project?.simulatorHost?.contentWindow?.document.documentElement.contains(target)) {
|
||||
return false;
|
||||
}
|
||||
// 点击设置区
|
||||
if (document.querySelector('.lc-right-area')?.contains(target)) {
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user