summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core
diff options
context:
space:
mode:
authorBenjamin Vray <bvr@odoo.com>2020-06-30 13:23:31 +0000
committerqsm-odoo <qsm@odoo.com>2020-06-30 14:19:17 +0000
commit58179cebf19b78b6c0feeac0edf7f30f49ad41bb (patch)
tree1f767fe9cefbf4147d0f5b86c969e675ba2bfb18 /addons/web/static/src/js/core
parent4341a4d79571047bee3ab7560cd6d7fceb1368ad (diff)
[IMP] web, *: replace the bootstrap backdrop element with a bg on modals
*: web_editor Do not display the backdrop element added by bootstrap in the body and add a background on the modal to keep the same effect. The bootstrap backdrop was probably useful for compatibility with <IE9 but is no longer needed. This also avoids z-index issues because modals could be opened in an element (e.g. the website #wrapwrap) whose stacking context is different of the body one (where the backdrop is opened). This would make the backdrop appears on top of the modal. Part of https://github.com/odoo/odoo/pull/49142 Related to task-2229551 Co-authored-by: qsm-odoo <qsm@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/core')
-rw-r--r--addons/web/static/src/js/core/owl_dialog.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/core/owl_dialog.js b/addons/web/static/src/js/core/owl_dialog.js
index daa29468934..3572742a698 100644
--- a/addons/web/static/src/js/core/owl_dialog.js
+++ b/addons/web/static/src/js/core/owl_dialog.js
@@ -120,8 +120,12 @@ odoo.define('web.OwlDialog', function () {
/**
* @private
+ * @param {MouseEvent} ev
*/
- _onBackdropClick() {
+ _onBackdropClick(ev) {
+ if (!this.props.backdrop || ev.target !== ev.currentTarget) {
+ return;
+ }
if (this.props.backdrop === 'static') {
if (this.mainButton) {
this.mainButton.focus();