Merge pull request from patriceac/patch-33

Fix autoscroll behavior for the first image
This commit is contained in:
cmdr2
2023-02-20 18:56:52 +05:30
committed by GitHub

@ -39,7 +39,10 @@
function Autoscroll(target) {
if (autoScroll.checked && target !== null) {
target.parentElement.parentElement.parentElement.scrollIntoView();
const img = target.querySelector('img')
img.addEventListener('load', function() {
img.closest('.imageTaskContainer').scrollIntoView()
}, { once: true })
}
}
})()