summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/dialog.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-09-06 17:40:59 +0200
committerChristophe Simonis <chs@odoo.com>2017-09-06 17:40:59 +0200
commitd5382abeaad4d93b8def7e63cd47a86baaba8f0b (patch)
tree6364ff760709b541eebdde4b04494b480dec87fb /addons/web/static/src/js/core/dialog.js
parentc75fe95dfca366bf6c3b6a51908677039488aa4f (diff)
parentb8dd34fcbb895b8d62f3e133dcf5ee6f40a1400d (diff)
[MERGE] forward port branch saas-17 up to b8dd34fcbb8
Diffstat (limited to 'addons/web/static/src/js/core/dialog.js')
-rw-r--r--addons/web/static/src/js/core/dialog.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/addons/web/static/src/js/core/dialog.js b/addons/web/static/src/js/core/dialog.js
index dce47fa5a10..88bfae2b545 100644
--- a/addons/web/static/src/js/core/dialog.js
+++ b/addons/web/static/src/js/core/dialog.js
@@ -184,13 +184,12 @@ var Dialog = Widget.extend({
this.$modal.remove();
}
- setTimeout(function () { // Keep class modal-open (deleted by bootstrap hide fnct) on body to allow scrolling inside the modal
- var modals = $('body > .modal').filter(':visible');
- if (modals.length) {
- modals.last().focus();
- $('body').addClass('modal-open');
- }
- }, 0);
+ var modals = $('body > .modal').filter(':visible');
+ if (modals.length) {
+ modals.last().focus();
+ // Keep class modal-open (deleted by bootstrap hide fnct) on body to allow scrolling inside the modal
+ $('body').addClass('modal-open');
+ }
}
});