!147 模态框不失去焦点

Merge pull request !147 from ZoeLeeFZ/mg_bug
pull/147/MERGE
ChenX 6 years ago
parent 8c20412074
commit 87b86f0831

@ -79,6 +79,12 @@ export class ModalManage
//捕获蒙版的事件
this.m_Masking.addEventListener('keydown', e => e.stopPropagation());
this.m_Masking.addEventListener('click', e => e.stopPropagation());
//如果模态框,焦点保持在模态框上
this.m_Masking.addEventListener('focus', () =>
{
if (this.m_IsModal)
this.m_ModalContainer.focus();
});
}
OnKeyDown(e: KeyboardEvent)
{
@ -118,7 +124,7 @@ export class ModalManage
{
this.RenderModeless(Component, pos, props);
this.m_IsModal = true;
this.m_Masking.style.zIndex = "2";
this.m_Masking.style.zIndex = "25";
}
async ExecCmd()
{

Loading…
Cancel
Save