diff --git a/screenshot.html b/screenshot.html index b9bd3a422..9bbde632a 100644 --- a/screenshot.html +++ b/screenshot.html @@ -293,13 +293,17 @@

}); let height; const body = document.body; -myCodeMirror.on('change', function() { + +myCodeMirror.on('change', adjust_height); +myCodeMirror.on('inputRead', adjust_height); + +funtion adjust_height() { var rect = dialog.getBoundingClientRect(); if (height !== rect.height) { height = rect.height; body.style.setProperty('--height', rect.height + 300); } -}); +} - \ No newline at end of file + diff --git a/screenshot.tmpl b/screenshot.tmpl index fcebefca5..b0ec3bd81 100644 --- a/screenshot.tmpl +++ b/screenshot.tmpl @@ -205,14 +205,18 @@ button.addEventListener('click', () => { }); let height; const body = document.body; -myCodeMirror.on('change', function() { + +myCodeMirror.on('change', adjust_height); +myCodeMirror.on('inputRead', adjust_height); + +funtion adjust_height() { var rect = dialog.getBoundingClientRect(); if (height !== rect.height) { height = rect.height; body.style.setProperty('--height', rect.height + 300); } -}); +} {{FOOTER}} - \ No newline at end of file +