mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-15 14:27:22 +02:00
Merge pull request #903 from patriceac/patch-33
Fix autoscroll behavior for the first image
This commit is contained in:
commit
380e9aaf13
@ -39,7 +39,10 @@
|
|||||||
|
|
||||||
function Autoscroll(target) {
|
function Autoscroll(target) {
|
||||||
if (autoScroll.checked && target !== null) {
|
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 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user