forked from MarseyWorld/MarseyWorld
scroll when image loads
parent
93da418c16
commit
c0fbb39869
|
@ -403,7 +403,9 @@ function handle_files() {
|
|||
document.getElementById('image-preview').setAttribute('src', this.result);
|
||||
document.getElementById('image-preview').classList.remove('d-none');
|
||||
document.getElementById('image-preview').classList.add('mr-2');
|
||||
document.getElementById('image-preview').addEventListener('load', () => {
|
||||
box.scrollTo(0, box.scrollHeight)
|
||||
})
|
||||
};
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue