flashjs
flashjs copied to clipboard
Failed to execute 'removeChild' on 'Node' -> Fix
Unsure if @betaWeb still maintains this, but if so:
When clicking on a flash message, this causes the next error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
Even on the demo/example site.
To fix this, we want to turn removeChild()
into remove()
so we can properly target all children of the flash container.
I could make a pull request for merging if you'd like? (or fork it anyway?)
Hello @SjoerdHekking :)
You can make a PR if you want, thanks :)
Send a pull request, you should be able to merge it without problems. Thanks.
I'm experiencing the same issue on the code in master.zip. Any idea when this will be merged?
To work around the problem, I modified my dist/flash.min.js so that this.$_element.classList.removeChild(this.options.classes.visible)
becomes this.$_element.classList.remove(this.options.classes.visible)
{
key:"_close",
value:function(){
var e=this;
this._stopProgress(),
this._isInteractive()&&this._unbindEvents(),
this.$_element.classList.remove(this.options.classes.visible),
this.$_element.addEventListener(
"transitionend",
function(){
e.$_container.remove(e.$_element),e._clear()
}
)
}
}