diff options
Diffstat (limited to 'addons/web/static/src/js/core')
| -rw-r--r-- | addons/web/static/src/js/core/dialog.js | 13 | ||||
| -rw-r--r-- | addons/web/static/src/js/core/session.js | 5 |
2 files changed, 7 insertions, 11 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'); + } } }); diff --git a/addons/web/static/src/js/core/session.js b/addons/web/static/src/js/core/session.js index 065b3b360e5..fc45e669407 100644 --- a/addons/web/static/src/js/core/session.js +++ b/addons/web/static/src/js/core/session.js @@ -308,11 +308,8 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { }).always(function () { self.avoid_recursion = false; }); - } else { - // normal use case, just use the cookie - self.session_id = utils.get_cookie("session_id"); - return $.when(); } + return $.when(); }, /** * Executes an RPC call, registering the provided callbacks. |
