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

Write a Review - empty modal #2359

Open
rawi-rai opened this issue May 16, 2023 · 6 comments
Open

Write a Review - empty modal #2359

rawi-rai opened this issue May 16, 2023 · 6 comments

Comments

@rawi-rai
Copy link

rawi-rai commented May 16, 2023

empty modal when you open and close more than 1.

Write.A.Review.mp4
@rawi-rai
Copy link
Author

@BC-krasnoshapka

@Aidance-Scientific
Copy link

Aidance-Scientific commented May 19, 2023

In my experience, this problem occurs with any Foundation modal. The content loads properly the first time any modal is opened. Once closed, all content within div.modal-content is removed and not repopulated.

The last version of Cornerstone I worked with, 6.5, did not have this issue.

@loganofaz
Copy link

There is a function called clearContent() in the modal close function that wipes out the html in modal-content. My workaround is to just add content when the modal is opened, but it would be nice to just keep my modal content in a template file.

@Aidance-Scientific
Copy link

Interesting, thanks for the hint @loganofaz !
I commented out line 227 in modal.js which seems to have worked for the most part.

onModalClose() {
        $('body').removeClass(bodyActiveClass);

        // this.clearContent();
    }

Unfortunately modals on cart.php continue to clear permanently. There must be a similar function call in a cart page-specific script somewhere.

@BC-krasnoshapka
Copy link
Contributor

hey, this issue will be fixed by #2368 in the upcoming Cornerstone release.

@Aidance-Scientific
Copy link

Aidance-Scientific commented Jul 3, 2023 via email

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

4 participants