Modal: position backdrop absolute instead of fixed to..
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
This commit is contained in:
parent
26648e3752
commit
2fae7d478a
2 changed files with 0 additions and 16 deletions
|
@ -9,7 +9,6 @@
|
||||||
/*
|
/*
|
||||||
modified by Felix Jan-2014
|
modified by Felix Jan-2014
|
||||||
- add this.$body = $(options.container || document.body)
|
- add this.$body = $(options.container || document.body)
|
||||||
- adjustBackdrop: also adopt left, top and width from $body
|
|
||||||
modified by Felix Jul-2017
|
modified by Felix Jul-2017
|
||||||
- add rtl support
|
- add rtl support
|
||||||
*/
|
*/
|
||||||
|
@ -248,19 +247,8 @@
|
||||||
|
|
||||||
Modal.prototype.adjustBackdrop = function () {
|
Modal.prototype.adjustBackdrop = function () {
|
||||||
this.$backdrop
|
this.$backdrop
|
||||||
.css('left', this.$body.offset().left)
|
|
||||||
.css('top', this.$body.offset().top)
|
|
||||||
.css('width', this.$body.width())
|
|
||||||
.css('height', 0)
|
.css('height', 0)
|
||||||
.css('height', this.$element[0].scrollHeight)
|
.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 () {
|
Modal.prototype.adjustDialog = function () {
|
||||||
|
|
|
@ -6486,10 +6486,6 @@ footer {
|
||||||
max-width: 460px;
|
max-width: 460px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-backdrop {
|
|
||||||
position: fixed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border: 1px solid hsl(0,0%,90%);
|
border: 1px solid hsl(0,0%,90%);
|
||||||
|
|
Loading…
Reference in a new issue