From 3b98e003f475b669c006d7462257d5797f85fe05 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Tue, 29 Jun 2021 12:38:39 +0200 Subject: [PATCH] =?UTF-8?q?Form:=20refactor=20backdrop=20resizing=20?= =?UTF-8?q?=E2=80=93=20no=20more=20js=20needed;=20also=20resizes=20when=20?= =?UTF-8?q?textarea=20resizes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/form/form.css | 3 ++- public/assets/form/form.js | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/public/assets/form/form.css b/public/assets/form/form.css index 537fe64da..e9ed8bccb 100644 --- a/public/assets/form/form.css +++ b/public/assets/form/form.css @@ -36,6 +36,7 @@ text-align: center; z-index: 999; overflow: auto; + overscroll-behavior: contain; } .zammad-form-modal:before { @@ -47,7 +48,7 @@ } .zammad-form-modal-backdrop { - position: absolute; + position: fixed; left: 0; top: 0; width: 100%; diff --git a/public/assets/form/form.js b/public/assets/form/form.js index dcb7da0ee..ef4dda770 100644 --- a/public/assets/form/form.js +++ b/public/assets/form/form.js @@ -274,7 +274,6 @@ $(function() { _this.render() return true }) - window.addEventListener('resize', _this.resizeModalBackdrop.bind(_this)); } } @@ -373,12 +372,6 @@ $(function() { } } - Plugin.prototype.resizeModalBackdrop = function() { - if (this.$modal) { - this.$modal.find('.js-zammad-form-modal-backdrop').css('height', this.$modal.prop('scrollHeight')); - } - } - // render form Plugin.prototype.render = function(e) { var _this = this @@ -442,7 +435,6 @@ $(function() { // append modal to body else { $('body').append($element) - this.resizeModalBackdrop() } }