tabs: detach hidden tabs from the DOM (reduces lag caused by heavy tabs)
This commit is contained in:
parent
4bcd53e97c
commit
9388ad3d36
2 changed files with 7 additions and 0 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 1.16.2
|
||||
|
||||
- widgets
|
||||
- tabs: detach hidden tabs from the DOM (reduces lag caused by heavy tabs)
|
||||
|
||||
## 1.16.1
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ class Tab extends Panel {
|
|||
hide() {
|
||||
if (this.detached) return
|
||||
this.container.classList.remove('show')
|
||||
this.container.removeChild(this.widget)
|
||||
this.detached = true
|
||||
this.setVisibility()
|
||||
}
|
||||
|
|
@ -66,6 +67,7 @@ class Tab extends Panel {
|
|||
show() {
|
||||
if (!this.detached) return
|
||||
this.container.classList.add('show')
|
||||
this.container.appendChild(this.widget)
|
||||
this.detached = false
|
||||
this.setVisibility()
|
||||
resize.check(this.widget, true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue