summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-02-28 08:47:54 +0100
committerAaron Bohy <aab@odoo.com>2018-02-28 12:04:33 +0100
commitd4126f72788af03d33c64c11b3cbb97f431580bc (patch)
tree1c8cac3fe138e428a29f44359ee400fbd9dce0e4 /addons/web/static/src/js
parent26325dc9438da214764cb209fdbfd01d66f65e0a (diff)
[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
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/widgets/domain_selector_dialog.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/widgets/domain_selector_dialog.js b/addons/web/static/src/js/widgets/domain_selector_dialog.js
index 5f41973951d..46b54089c5f 100644
--- a/addons/web/static/src/js/widgets/domain_selector_dialog.js
+++ b/addons/web/static/src/js/widgets/domain_selector_dialog.js
@@ -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)