Changed conditions for allowing focus windows
This commit is contained in:
parent
c6314709ef
commit
1126392c15
@ -118,7 +118,6 @@ class buiWindow {
|
||||
draggable = "boolean" == typeof draggable ? draggable : true;
|
||||
if (draggable) {
|
||||
makeDraggable(this.root, this.titlebar);
|
||||
this.root.addEventListener("click", this.focus, {useCapture: true});
|
||||
}
|
||||
min = "boolean" == typeof min ? min : false;
|
||||
close = "boolean" == typeof close ? close : false;
|
||||
@ -151,6 +150,9 @@ class buiWindow {
|
||||
}
|
||||
this.root.appendChild(this.titlebar);
|
||||
this.root.appendChild(this.main);
|
||||
if (draggable || min || close) {
|
||||
this.root.addEventListener("click", this.focus, {useCapture: true});
|
||||
}
|
||||
}
|
||||
|
||||
focus () { focus_window(this); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user