diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-09-24 11:33:35 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-09-24 11:33:35 +0000 |
| commit | ebd0c90a146145079061e79c2d4c37fa182a2975 (patch) | |
| tree | 5ae193c2029790f43e7c54a0771647f4f6bb34d3 /addons/website/static/src | |
| parent | b94f54b5cdcbb58300a643a9c39f8c9d4842e41b (diff) | |
[FIX] website, *: review modal behaviors with right-panelization
*: web, web_editor
Since the right-panelization made with [1], the modals were not
compensating the body scrollbar when opened anymore and the backdrop
was misplaced. This commit fixes the problems generically, to support
modals with non-body scrolling.
[1]: https://github.com/odoo/odoo/pull/57975
closes odoo/odoo#58414
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/content/menu.js | 8 | ||||
| -rw-r--r-- | addons/website/static/src/scss/website.edit_mode.scss | 2 |
2 files changed, 2 insertions, 8 deletions
diff --git a/addons/website/static/src/js/content/menu.js b/addons/website/static/src/js/content/menu.js index 70ed4565185..b1da4caf809 100644 --- a/addons/website/static/src/js/content/menu.js +++ b/addons/website/static/src/js/content/menu.js @@ -73,13 +73,7 @@ const BaseAnimatedHeader = animations.Animation.extend({ * @private */ _adaptFixedHeaderPosition() { - // Compensate scrollbar - this.el.style.removeProperty('right'); - if (this.fixedHeader) { - const scrollableEl = this.$el.parent().closestScrollable()[0]; - const style = window.getComputedStyle(this.el); - this.el.style.setProperty('right', `${parseInt(style['right']) + scrollableEl.offsetWidth - scrollableEl.clientWidth}px`, 'important'); - } + dom.compensateScrollbar(this.el, this.fixedHeader, false, 'right'); }, /** * @private diff --git a/addons/website/static/src/scss/website.edit_mode.scss b/addons/website/static/src/scss/website.edit_mode.scss index 72c3a5f6538..f43fbef9548 100644 --- a/addons/website/static/src/scss/website.edit_mode.scss +++ b/addons/website/static/src/scss/website.edit_mode.scss @@ -159,8 +159,8 @@ body.editor_enable.editor_has_snippets { .s_popup .modal { // s_popup in edit mode - top: var(--o-we-toolbar-height); background-color: transparent; + &.fade .modal-dialog { transform: none; } |
