summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/dialog.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-09-06 13:29:05 +0200
committerChristophe Simonis <chs@odoo.com>2017-09-06 13:29:05 +0200
commitb8dd34fcbb895b8d62f3e133dcf5ee6f40a1400d (patch)
tree196c99a14d51d88a2f81f12be98fb8ff2c4359f7 /addons/web/static/src/js/core/dialog.js
parent16541ae2ae953195f1bd0036e474aac0014aee4b (diff)
parent64d56995e049d7e7bc3aa7af5a16603220b0d4bc (diff)
[MERGE] forward port branch saas-16 up to 64d56995e04
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 6214c99483e..11ce34770de 100644
--- a/addons/web/static/src/js/core/dialog.js
+++ b/addons/web/static/src/js/core/dialog.js
@@ -151,13 +151,12 @@ var Dialog = Widget.extend({
this.$modal.modal('hide');
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');
+ }
}
});