diff --git a/source/Component/Popup/Popup.tsx b/source/Component/Popup/Popup.tsx index c029472..6e8e129 100644 --- a/source/Component/Popup/Popup.tsx +++ b/source/Component/Popup/Popup.tsx @@ -78,9 +78,6 @@ class Popup extends Component {popup.onRenderHeader()} @@ -257,6 +254,11 @@ class Popup extends Component { + if (this.props.status) { + this.props.status.popup.topping(popup); + } + }} > {this.renderDragLine(ResizeDragDirection.top, popup)}
diff --git a/source/Context/Popups.ts b/source/Context/Popups.ts index 561832c..e5e4cd6 100644 --- a/source/Context/Popups.ts +++ b/source/Context/Popups.ts @@ -163,8 +163,12 @@ class PopupController extends Emitter { newPopup = new (popup ?? Popup)(props); } newPopup.init(this, `P-${this.idIndex ++}`); - this.popups.push(newPopup); - this.sortPopup(); + + // 延迟渲染防止焦点冲突 + setTimeout(() => { + this.popups.push(newPopup); + this.sortPopup(); + }); return newPopup; }