修复:避免窗体丢失焦点后,模态框错误的认为我们还按下了按键

pull/1500/head
ChenX 3 years ago
parent d314f8f9c6
commit 10e9cd2c8a

@ -77,6 +77,13 @@ export class ModalManage
this.m_ModalContainer.addEventListener('keyup', e => this.onKeyUp(e));
this.m_ModalContainer.addEventListener('focus', e => this.onFocus(e), true);
//因为这个UI接管了按键操作,所以必须hack它,TODO:以后寻找更好的方法更改这个
window.addEventListener("blur", e =>
{
this.IsAltDown = false;
this.IsCtrlDown = false;
});
xaop.begin(this.ed.MaskManage, this.ed.MaskManage.OnFocusEvent, (e: KeyboardEvent) =>
{
if (this.IsModal)

Loading…
Cancel
Save