tab/modal: force resize handlers to avoid blank canvas cached styles
This commit is contained in:
parent
97ccf3dc38
commit
ea8b69b944
3 changed files with 5 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
var elements = []
|
||||
|
||||
function checkResizes(context){
|
||||
function checkResizes(context, force){
|
||||
// Iterate over all elements to which the 'resize' event is bound.
|
||||
var resizedElems = [],
|
||||
cachedStyles = []
|
||||
|
|
@ -17,7 +17,7 @@ function checkResizes(context){
|
|||
|
||||
// If element size has changed since the last time, update the element
|
||||
// data store and trigger the 'resize' event.
|
||||
if (width != elem.resizedataw || height != elem.resizedatah) {
|
||||
if (force || width != elem.resizedataw || height != elem.resizedatah) {
|
||||
elem.resizedataw = width
|
||||
elem.resizedatah = height
|
||||
resizedElems.push(elem)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
var Panel = require('./panel'),
|
||||
{icon, iconify} = require('../../ui/utils'),
|
||||
resize = require('../../events/resize'),
|
||||
doubletab = require('../mixins/double_tap')
|
||||
|
||||
|
||||
|
|
@ -127,7 +128,7 @@ module.exports = class Modal extends Panel {
|
|||
this.bindEscKey(this.value)
|
||||
|
||||
if (this.value) {
|
||||
DOM.dispatchEvent(window, 'resize')
|
||||
resize.check(this.widget, true)
|
||||
}
|
||||
|
||||
if (this.init) this.fixParents()
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ module.exports = class Tab extends Panel {
|
|||
this.container.appendChild(this.widget)
|
||||
this.container.classList.add('show')
|
||||
this.detached = false
|
||||
resize.check(this.widget)
|
||||
resize.check(this.widget, true)
|
||||
}
|
||||
|
||||
onPropChanged(propName, options, oldPropValue) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue