diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-02-23 10:45:47 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-02-23 13:34:55 +0100 |
| commit | 380a1fd544ef352b82224610c669ebb075199216 (patch) | |
| tree | 7d1d01f92bb6090953f65932284e522f52189517 /addons/web/static/src/js/framework | |
| parent | e7770ed9c774eb4aa7aa78f16fd0b75b26309b5a (diff) | |
[FIX] web: Dialog closing
The Dialog class destroys the modal (and so removes it from the DOM)
when the dialog closes but leaves the modal-open class on the body
element if there are still other modal(s) in the DOM.
The problem is that (maily on the frontend side) there may be others
modal(s) in the DOM (not handled by the Dialog class) but which are
not shown to the user, and in that case the modal-open class should
be removed.
Diffstat (limited to 'addons/web/static/src/js/framework')
| -rw-r--r-- | addons/web/static/src/js/framework/dialog.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/framework/dialog.js b/addons/web/static/src/js/framework/dialog.js index b5e63834614..cd4540af270 100644 --- a/addons/web/static/src/js/framework/dialog.js +++ b/addons/web/static/src/js/framework/dialog.js @@ -137,7 +137,7 @@ 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'); + var modals = $('body > .modal').filter(':visible'); if(modals.length) { modals.last().focus(); $('body').addClass('modal-open'); |
