Blur inputs when clicking on stage
Fixes key input in some situations
This commit is contained in:
1 file changed
+4
@@ -116,6 +116,9 @@ class Scaffolding extends EventTarget {
|
||||
|
||||
_onmousedown (e) {
|
||||
e.preventDefault();
|
||||
if (document.activeElement && document.activeElement.blur) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
const data = {
|
||||
x: e.clientX - this.layersRect.left,
|
||||
y: e.clientY - this.layersRect.top,
|
||||
@@ -161,6 +164,7 @@ class Scaffolding extends EventTarget {
|
||||
}
|
||||
|
||||
_onkeydown (e) {
|
||||
console.log(e.target);
|
||||
if (e.target !== document && e.target !== document.body) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user