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

Coloris element remains on page when navigating away [REACT] #70

Closed
TerdyTheTerd opened this issue Dec 21, 2022 · 4 comments
Closed

Coloris element remains on page when navigating away [REACT] #70

TerdyTheTerd opened this issue Dec 21, 2022 · 4 comments
Labels
wontfix This will not be worked on

Comments

@TerdyTheTerd
Copy link

The Coloris element remains in the DOM when navigating to different pages, this is why an onDestroy is required so we can properly remove this and prevent it from existing past when it's supposed to.
image

My manual solution in the meantime, if I want to use this library, is I have to call a function to delete this element on every page at startup, which is not ideal in the slightest.

@TerdyTheTerd
Copy link
Author

PS* The reason it's not styled in the above screenshot is because the styling is only loaded on the page where it's supposed to be used, this is from a completely unrelated page where the element still exist when it shouldn't. Force reloading removes it, but once again, not ideal as that prevents any caching.

@mdbassit
Copy link
Owner

When you say "navigating to different pages" I'm assuming you don't mean actually navigating away to a physical page, but rather some framework's (React?) interpretation of page where the new content is injected in some element (body?) on demand.

Unfortunately there is no way for me to know when such action might happen, so you will have to keep doing it manually. I generally do not try and support some framework or the other.

@mdbassit mdbassit added the wontfix This will not be worked on label Dec 22, 2022
@TerdyTheTerd
Copy link
Author

Weird to not support React, when all it needs is proper methods to remove itself from the page so the onDestroy method can call that to clean it up...but I'll close this out since I have a manual solution.

@melloware
Copy link
Contributor

@TerdyTheTerd can you post your destroy method for us other React users to see please?

felixhahnweilheim added a commit to felixhahnweilheim/humhub-flex-theme that referenced this issue Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants