diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-04-01 16:20:00 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-04-01 16:20:00 +0200 |
| commit | 7ac5ec628cb9fe8ff3f6b54a1466f246a24ff01c (patch) | |
| tree | e9297c876e0f9886c1b0abbb7e5cd389a7ab708c /addons/web/static/src/js/core | |
| parent | 8de362fac65867687a3eb0557012db75faeab850 (diff) | |
| parent | 18c735361a6861a294a9dc254395a084eb42f505 (diff) | |
[MERGE] forward port branch saas-12.2 up to 18c735361a6
Diffstat (limited to 'addons/web/static/src/js/core')
| -rw-r--r-- | addons/web/static/src/js/core/dialog.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/src/js/core/dialog.js b/addons/web/static/src/js/core/dialog.js index 8630b6b9364..807411144e9 100644 --- a/addons/web/static/src/js/core/dialog.js +++ b/addons/web/static/src/js/core/dialog.js @@ -231,13 +231,13 @@ var Dialog = Widget.extend({ this.$modal.remove(); } - if (!isFocusSet) { - var modals = $('body > .modal').filter(':visible'); - if (modals.length) { + var modals = $('body > .modal').filter(':visible'); + if (modals.length) { + if (!isFocusSet) { modals.last().focus(); - // Keep class modal-open (deleted by bootstrap hide fnct) on body to allow scrolling inside the modal - $('body').addClass('modal-open'); } + // Keep class modal-open (deleted by bootstrap hide fnct) on body to allow scrolling inside the modal + $('body').addClass('modal-open'); } }, /** |
