Second modal always shows the first modal's content
Hi everyone, I'm stuck on a stubborn modal issue. On a custom page with a table, my first modal action works fine. But after I close it, any other modal action I click just shows the content of the first one again, not the new one.
I've tried all the standard solutions for this "stale state" problem, and even the most aggressive fixes are not working:
Thanks for any help!
I've tried all the standard solutions for this "stale state" problem, and even the most aggressive fixes are not working:
- Overriding mountAction() to call $this->reset() at the very beginning. The state is being reset on the server.
- Using JavaScript to listen for an event and forcefully clear the modal's HTML (.innerHTML = '') before the new content is loaded.
Thanks for any help!