You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to add a listener to a form to take some action on turbograft:remote:always, (after completion of the submitting of that form, one way or another), and it was not working for me. The reason was that the form was being replaced by a partial refresh, and the event listener was being cleaned up (maybe by twine?) before turbograft:remote:always had fired.
I was able to achieve the behavior I was looking for with listening on 'turbograft:remote:success turbograft:remote:fail' which both fire before the cleanup has occurred, but perhaps loadend is too late for turbograft:remote:always?
Keeping always the same means it won't break anything we've already built that might be expecting this behaviour, but I sort of feel like those names are counterintuitive.
always feels like it should basically be sugar for being both success and fail
complete sounds more like it would occur after replacements
Not sure how much that behaviour change would break though :(
I was trying to add a listener to a form to take some action on
turbograft:remote:always
, (after completion of the submitting of that form, one way or another), and it was not working for me. The reason was that the form was being replaced by a partial refresh, and the event listener was being cleaned up (maybe by twine?) beforeturbograft:remote:always
had fired.I was able to achieve the behavior I was looking for with listening on
'turbograft:remote:success turbograft:remote:fail'
which both fire before the cleanup has occurred, but perhapsloadend
is too late forturbograft:remote:always
?@qq99
The text was updated successfully, but these errors were encountered: