From 12909a248dfc2e9598cd4b17c8cf33435618b768 Mon Sep 17 00:00:00 2001 From: Andrew Prendergast Date: Tue, 2 Feb 2016 06:02:35 +1100 Subject: [PATCH] fix issue with cached elements having lingering style data when they are re-used @see artichox's comment 4-Sep at https://github.com/Famous/engine/issues/487 --- dom-renderables/DOMElement.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dom-renderables/DOMElement.js b/dom-renderables/DOMElement.js index 09ba6624..67674f9c 100644 --- a/dom-renderables/DOMElement.js +++ b/dom-renderables/DOMElement.js @@ -186,6 +186,10 @@ DOMElement.prototype.onMount = function onMount(node, id) { * @return {undefined} undefined */ DOMElement.prototype.onDismount = function onDismount() { + for ( var i in this._styles ) + this.setProperty(i, ''); + for ( var i in this._attributes ) + this.setAttribute(i, ''); this.setProperty('display', 'none'); this.setAttribute('data-fa-path', ''); this.setCutoutState(false);