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

Style Background Transparent Not removed on Destroy #87

Open
Johnferguson1440 opened this issue Apr 25, 2024 · 1 comment
Open

Style Background Transparent Not removed on Destroy #87

Johnferguson1440 opened this issue Apr 25, 2024 · 1 comment

Comments

@Johnferguson1440
Copy link

When mentionsInput is initialized it adds the style background transparent. Found that when you destroy the mentionsInput the style remains on the element. I would expect when destroy is called that everything that was added would be removed. Currently just manually removing the background color when calling destroy. Possible solution to add to the destroy method is to set the background for the input to empty string to prevent unwanted css applied.

@Johnferguson1440
Copy link
Author

This fixes it for me if i update the js file
MentionsInput.prototype.destroy = function() {
this.input.areacomplete("destroy");
this.input.off("." + namespace).attr('name', this.hidden.attr('name'));
this.input.css('backgroundColor', '');
return this.container.replaceWith(this.input);
};

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

1 participant