动态输入时,已经有输入的情况下,esc直接Cancel,点击画布也将结束输入.

pull/109/head
ChenX 6 years ago
parent e3b565c469
commit 308eeb313b

@ -30,6 +30,7 @@ export class DynamicInputManage
this.container.style.height = "100%";
this.container.style.left = "0px";
this.container.style.top = "0px";
this.container.addEventListener("mousedown", () => { this.IsInputing = false });
document.body.appendChild(this.container);
@ -120,13 +121,13 @@ export class DynamicInputManage
case KeyBoard.Escape:
if (this.IsInputing)
{
this.IsInputing = false;
e.preventDefault();
e.stopPropagation();
// this.IsInputing = false;
// e.preventDefault();
// e.stopPropagation();
let dyn = this.inputCollection[this.focusIndex];
if (dyn)
dyn.Focus();
// let dyn = this.inputCollection[this.focusIndex];
// if (dyn)
// dyn.Focus();
}
break;
case KeyBoard.Tab:

Loading…
Cancel
Save