-
Notifications
You must be signed in to change notification settings - Fork 107
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
Opening up cart modal appends new cart instance to the DOM #285
Comments
Labeling as enhancement since AFIAK this doesnt break anything. If it's actually breaking something, please update the ticket. |
Well it actually does break quite much - making a custom cart with it's event listeners can cause the page to be really laggy after opening up the cart for a few times. Please consider marking it as a bug, because I'm sure it is not a good thing to append stuff in DOM instead of just making them visible again. |
@m-suchorski I think the label is really just semantics but I agree it can lead to performance issues. We can prioritize making this update, I'm assuming the LOE should be relatively small. |
I expect this change will need to be in ... and should leverage SemanticUI modals' functions for self clean-up. I would've thought Semantic's Modal Lib wouldve handled this so it'll require investigation as to why its not. |
Thank you guys, I hope you can resolve that issue without any problems. |
agreed @davidjgonzalez wrt to Semantic UI modal, should follow Semantic's best practices. Potentially related is that we perform a post to generate a new modal even if the cart contents has not changed. I think we should also consider some very basic state management to the cart to avoid additional ajax calls. |
@m-suchorski see PR #286. Will you pull the latest from the develop branch and verify that the issue is fixed and your custom cart modal continues to work as expected? |
@godanny86 my issue has been fixed on your develop branch - thanks! I've been doing some testing around it and everything seems to be working just fine. |
Describe the bug
When user opens a cart modal by clicking the cart icon it creates a new instance of the modal in the DOM instead of opening up the existing one.
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Cart modal should show up without it being appended to the DOM again (so there is only ONE cart instance on the page instead of n instances - n being the number you click on the cart).
Screenshots
Opening the cart up for the first time:
Opening the cart up for the third time (note three forms instead of one):
The text was updated successfully, but these errors were encountered: