Repository navigation
Conversation
There was a problem hiding this comment.
Hi @fhelfer,
Thx a lot for the bugfix!
Please help me answer the following questions:
- Do I understand correctly that this addresses two separate issues? One being the availability of all sections which is not always the case, the other being the JS code that is provided async that is not always or ever considered?
- Could you look into whether we could replace the approach used inside the prompt JS using the
DOMParserwith theAsyncRendererimplementation of the UI framework? This should already take care of the scripts issue I think.
Thx for following up here.
Kind regards,
@thibsy (as UI coordinator)
|
Hi @thibsy, Thanks for the review.
Yes, this addresses two separate issues:
I replaced the DOMParser approach with AsyncRenderer. loadContent() now accepts RequestInit, because prompt forms POST a FormData body and a GET-only fetch would drop that. AsyncRenderer also keeps data-replace-marker on restored script tags. Without that attribute the prompt cannot find the onload script, and the buttons stay inert. Kind regards, @fhelfer |
DOMParser entfällt. Fetch-Optionen bleiben für Formular-POSTs erhalten, data-replace-marker an wiederhergestellten Scripts ebenfalls.
10338a4 to
9364acc
Compare
|
This is part of #12303 now, so I close this one. |
Fixes: https://mantis.ilias.de/view.php?id=48244