diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-03-29 18:10:57 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-03-29 18:10:57 +0100 |
| commit | 2a06f4dcf3ab03d3d0b6ed14d6ccd12140063b27 (patch) | |
| tree | c3bf62aedae655cdaddb61f6b86703c2a1d9448d /addons/web/static/src/js/core | |
| parent | 1a5ab9265425934a717fd6d57260146a524c208a (diff) | |
| parent | 09fb2469b490d48ce937a41a63447e099b93c637 (diff) | |
[MERGE] forward port branch 12.0 up to 09fb2469b49
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 83eded92c8a..3c1013c2944 100644 --- a/addons/web/static/src/js/core/dialog.js +++ b/addons/web/static/src/js/core/dialog.js @@ -229,13 +229,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'); } }, /** |
