app/javascript/avo.base.js in avo-3.11.7 vs app/javascript/avo.base.js in avo-3.11.8
- old
+ new
@@ -80,9 +80,16 @@
}, 1)
})
document.addEventListener('turbo:frame-load', () => {
initTippy()
+
+ // Handles turbo bug with lazy loading
+ // https://github.com/hotwired/turbo/issues/886
+ // Remove when PR https://github.com/hotwired/turbo/pull/1227 is merged
+ document
+ .querySelectorAll('turbo-frame[loading="lazy"][complete]')
+ .forEach((frame) => frame.removeAttribute('loading'))
})
document.addEventListener('turbo:before-fetch-response', async (e) => {
if (e.detail.fetchResponse.response.status === 500) {
const { id, src } = e.target