diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-09-06 17:40:59 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-09-06 17:40:59 +0200 |
| commit | d5382abeaad4d93b8def7e63cd47a86baaba8f0b (patch) | |
| tree | 6364ff760709b541eebdde4b04494b480dec87fb /addons/web/static/src/js/core/dialog.js | |
| parent | c75fe95dfca366bf6c3b6a51908677039488aa4f (diff) | |
| parent | b8dd34fcbb895b8d62f3e133dcf5ee6f40a1400d (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.js | 13 |
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'); + } } }); |
