Optim popup focus
This commit is contained in:
parent
241161ebb6
commit
cdc2eb8feb
@ -78,9 +78,6 @@ class Popup extends Component<IPopupProps & IMixinStatusProps & IMixinSettingPro
|
|||||||
popup.isOnMouseDown = true;
|
popup.isOnMouseDown = true;
|
||||||
popup.lastMouseLeft = e.clientX;
|
popup.lastMouseLeft = e.clientX;
|
||||||
popup.lastMouseTop = e.clientY;
|
popup.lastMouseTop = e.clientY;
|
||||||
if (this.props.status) {
|
|
||||||
this.props.status.popup.topping(popup);
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{popup.onRenderHeader()}
|
{popup.onRenderHeader()}
|
||||||
@ -257,6 +254,11 @@ class Popup extends Component<IPopupProps & IMixinStatusProps & IMixinSettingPro
|
|||||||
className: "popup-layer" + (hasAnimate ? " show-scale" : ""),
|
className: "popup-layer" + (hasAnimate ? " show-scale" : ""),
|
||||||
backgroundLevel: BackgroundLevel.Level4,
|
backgroundLevel: BackgroundLevel.Level4,
|
||||||
}, this.props.setting).join(" ")}
|
}, this.props.setting).join(" ")}
|
||||||
|
onClick={() => {
|
||||||
|
if (this.props.status) {
|
||||||
|
this.props.status.popup.topping(popup);
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{this.renderDragLine(ResizeDragDirection.top, popup)}
|
{this.renderDragLine(ResizeDragDirection.top, popup)}
|
||||||
<div className="popup-layer-container">
|
<div className="popup-layer-container">
|
||||||
|
@ -163,8 +163,12 @@ class PopupController extends Emitter<IPopupControllerEvent> {
|
|||||||
newPopup = new (popup ?? Popup)(props);
|
newPopup = new (popup ?? Popup)(props);
|
||||||
}
|
}
|
||||||
newPopup.init(this, `P-${this.idIndex ++}`);
|
newPopup.init(this, `P-${this.idIndex ++}`);
|
||||||
this.popups.push(newPopup);
|
|
||||||
this.sortPopup();
|
// 延迟渲染防止焦点冲突
|
||||||
|
setTimeout(() => {
|
||||||
|
this.popups.push(newPopup);
|
||||||
|
this.sortPopup();
|
||||||
|
});
|
||||||
return newPopup;
|
return newPopup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user