Button in fragment misses a __FRAGMENT__ replacement on rerender
Closed this issue · 2 comments
kevindeyne commented
In version 0.9.0, when you have a fragment which contains a button, upon rerender it can revert back to __FRAGMENT__
<button class="slot" onclick="_M.doAction(event, '__FRAGMENT__', `doAction(0)`)">Standard damage</button>
instead of
<button class="slot" onclick="_M.doAction(event, 'combat', `doAction(0)`)">Standard damage</button>
I'd need to investigate what specifically causes this
kevindeyne commented
Core of this problem lies in hitting the max depth:
medusa/medusa-ui/src/main/java/io/getmedusa/medusa/core/render/Renderer.java
Lines 233 to 238 in c5f6c7e
Which hits 100 pretty fast in my example
kevindeyne commented
Figured out this is caused by not resetting the session depth after rendering. Session resets per page load, but if a page is continuously used, it keeps counting up.
1dd771b