[FIX] web: DomainSelectorDialog: prevent overflow
The DomainSelectorDialog behaves differently from classical dialogs in terms of height and overflow: (1) its height can be larger than the screen height, and (2) its content is never scrollable (overflow visible). However, before this rev., the 'height: auto' rule ensuring (1) didn't apply, so the dialog's height was limited to the screen's height, and when it had to much content to display, it overflowed. It didn't work because the code tried to apply the rule too soon, so the .modal-dialog element was not yet available. Fixes #23292
This commit is contained in:
@@ -40,7 +40,11 @@ return Dialog.extend({
|
||||
this.domainSelector = new DomainSelector(this, model, domain, options);
|
||||
},
|
||||
start: function () {
|
||||
this.$el.css("overflow", "visible").closest(".modal-dialog").css("height", "auto"); // This restores default modal height (bootstrap) and allows field selector to overflow
|
||||
var self = this;
|
||||
this.opened().then(function () {
|
||||
// this restores default modal height (bootstrap) and allows field selector to overflow
|
||||
self.$el.css('overflow', 'visible').closest('.modal-dialog').css('height', 'auto');
|
||||
});
|
||||
return $.when(
|
||||
this._super.apply(this, arguments),
|
||||
this.domainSelector.appendTo(this.$el)
|
||||
|
||||
Reference in New Issue
Block a user