diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-03-29 19:47:46 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-03-29 19:47:46 +0100 |
| commit | 28cce6ce3a42fab2b4ab185aed024850e7492a86 (patch) | |
| tree | 47d9f742a4fae5e78c6ab2b9eb4ed5052f32325c /addons/web/static/src/js/core | |
| parent | 98e4540fe9adab8bd0d77fbff7906a5b7fbd01a3 (diff) | |
| parent | c0cf4049b2a4a7c51169ea88569fd7f89e503a59 (diff) | |
[MERGE] forward port branch saas-12.1 up to c0cf4049b2a
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'); } }, /** |
