diff --git a/data/interfaces/default/newsletter_config.html b/data/interfaces/default/newsletter_config.html index 52d54f78..75df94cd 100644 --- a/data/interfaces/default/newsletter_config.html +++ b/data/interfaces/default/newsletter_config.html @@ -766,9 +766,12 @@ // auto resizing textarea for custom notification message body $('textarea[data-autoresize]').each(function () { + var modal_body = $(this).closest('.modal-body'); var offset = this.offsetHeight - this.clientHeight; var resizeTextarea = function (el) { + var modal_offset = modal_body.scrollTop(); $(el).css('height', 'auto').css('height', el.scrollHeight + offset); + modal_body.scrollTop(modal_offset); }; $(this).on('focus keyup input', function () { resizeTextarea(this); }).removeAttr('data-autoresize'); }); diff --git a/data/interfaces/default/notifier_config.html b/data/interfaces/default/notifier_config.html index f0a60430..7a164d0f 100644 --- a/data/interfaces/default/notifier_config.html +++ b/data/interfaces/default/notifier_config.html @@ -811,9 +811,12 @@ // auto resizing textarea for custom notification message body $('textarea[data-autoresize]').each(function () { + var modal_body = $(this).closest('.modal-body'); var offset = this.offsetHeight - this.clientHeight; var resizeTextarea = function (el) { + var modal_offset = modal_body.scrollTop(); $(el).css('height', 'auto').css('height', el.scrollHeight + offset); + modal_body.scrollTop(modal_offset); }; $(this).on('focus keyup input', function () { resizeTextarea(this); }).removeAttr('data-autoresize'); });