modal: fix visible property (add Widget.childrenVisible() handle this kind of exceptions properly)

This commit is contained in:
bordun 2021-01-17 18:38:39 +01:00
parent 148c43a369
commit 863398c2e1
4 changed files with 19 additions and 4 deletions

View file

@ -1,10 +1,12 @@
# Changelog
## next
## 1.8.3
- bug fixes
- keyboard: allow note numbers up to 127
- server: return http 404 error when a user-requested resource is not found instead of keeping a pending request
- modal: `vibible` property not applied correctly
- project tree
- add an input for filtering displayed widget by id

View file

@ -100,6 +100,13 @@ class ColorPicker extends UiWidget {
}
childrenVisible() {
return true
}
setName(n = '') {
this.name = n

View file

@ -1065,7 +1065,13 @@ class Widget extends EventEmitter {
isVisible() {
return this.getProp('visible') && this.parent.isVisible()
return this.getProp('visible') && this.parent.childrenVisible()
}
childrenVisible() {
return this.isVisible()
}

View file

@ -127,9 +127,9 @@ class Modal extends Panel {
}
isVisible() {
childrenVisible() {
return this.init && this.value && super.isVisible()
return this.init && this.value && this.isVisible()
}