Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute 'removeChild' on 'Node' -> Fix #2

Open
SjoerdHekking opened this issue Jul 17, 2022 · 3 comments
Open

Failed to execute 'removeChild' on 'Node' -> Fix #2

SjoerdHekking opened this issue Jul 17, 2022 · 3 comments

Comments

@SjoerdHekking
Copy link

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?)

@betaWeb
Copy link
Owner

betaWeb commented Jul 18, 2022

Hello @SjoerdHekking :)

You can make a PR if you want, thanks :)

@SjoerdHekking
Copy link
Author

Send a pull request, you should be able to merge it without problems. Thanks.

@patrick-melo
Copy link

patrick-melo commented Mar 1, 2023

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()
            }
        )
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants