diff --git a/core/Node.js b/core/Node.js index ec995513..a3411ba2 100644 --- a/core/Node.js +++ b/core/Node.js @@ -922,8 +922,8 @@ Node.prototype._vecOptionalSet = function _vecOptionalSet (vec, index, val) { * @return {Node} this */ Node.prototype.show = function show () { - Dispatch.show(this.getLocation()); this._shown = true; + Dispatch.show(this.getLocation()); return this; }; @@ -937,8 +937,8 @@ Node.prototype.show = function show () { * @return {Node} this */ Node.prototype.hide = function hide () { - Dispatch.hide(this.getLocation()); this._shown = false; + Dispatch.hide(this.getLocation()); return this; }; diff --git a/dom-renderables/DOMElement.js b/dom-renderables/DOMElement.js index 09ba6624..ab58dc5a 100644 --- a/dom-renderables/DOMElement.js +++ b/dom-renderables/DOMElement.js @@ -204,7 +204,7 @@ DOMElement.prototype.onDismount = function onDismount() { * @return {undefined} undefined */ DOMElement.prototype.onShow = function onShow() { - this.setProperty('display', 'block'); + if (this._node.isShown()) this.setProperty('display', 'block'); }; /**