From 2fae7d478aa320c6874e858383c8b36d0d042d14 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 4 Oct 2018 15:51:05 +0200 Subject: [PATCH] Modal: position backdrop absolute instead of fixed to.. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a) improve the scroll performance b) prevent that touch/mousewheel scrolling doesn’t work in some cases c) prevent that scrolling using the scrollbar closes the modal --- app/assets/javascripts/app/lib/bootstrap/modal.js | 12 ------------ app/assets/stylesheets/zammad.scss | 4 ---- 2 files changed, 16 deletions(-) diff --git a/app/assets/javascripts/app/lib/bootstrap/modal.js b/app/assets/javascripts/app/lib/bootstrap/modal.js index 8224c7051..8a05b8585 100644 --- a/app/assets/javascripts/app/lib/bootstrap/modal.js +++ b/app/assets/javascripts/app/lib/bootstrap/modal.js @@ -9,7 +9,6 @@ /* modified by Felix Jan-2014 - add this.$body = $(options.container || document.body) - - adjustBackdrop: also adopt left, top and width from $body modified by Felix Jul-2017 - add rtl support */ @@ -248,19 +247,8 @@ Modal.prototype.adjustBackdrop = function () { this.$backdrop - .css('left', this.$body.offset().left) - .css('top', this.$body.offset().top) - .css('width', this.$body.width()) .css('height', 0) .css('height', this.$element[0].scrollHeight) - - if(App.i18n.dir() == 'rtl'){ - this.$backdrop.css('right', 'auto') - } - - if(this.scrollbarWidth){ - this.$backdrop.css('width', this.$body.width() - this.scrollbarWidth) - } } Modal.prototype.adjustDialog = function () { diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index eef503d14..d392b8b77 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -6486,10 +6486,6 @@ footer { max-width: 460px; } -.modal-backdrop { - position: fixed; -} - .modal-content { border-radius: 0; border: 1px solid hsl(0,0%,90%);