summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorMohammed Shekha <msh@openerp.com>2018-08-31 17:51:31 +0530
committerVincent Schippefilt <vsc@odoo.com>2018-10-09 09:46:39 +0200
commit8445baa08d4f7cdbe60555ef1ff691a37e99d900 (patch)
tree6b8f64102874d90f9b7423a9e4a97c942f5fef83 /addons/web/static/src
parentfc411ceb191dd1cf789f199814d12eb32479632c (diff)
[FIX]web: do not crash when dismissing a modal with escape
stopPropagation of navigation_move event for where direction=cancel, currently if navigation_move event throws error when user press escape in dialog where dialog is opened from editable list record Scenario: Install website_sale -> Open Product form(variant enable) -> open variant tab -> open Attribute m2o form popup and press Escape on dialog Result: Error Expected: It should close dialog and keep editable list view record open, btw m2o field should also be focused when dialog is closed but that's another issue, will be fixed in another ongoing task Related to Issue: #1873919 Co-authored-by: Vincent Schippefilt <vsc@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/form/form_renderer.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/addons/web/static/src/js/views/form/form_renderer.js b/addons/web/static/src/js/views/form/form_renderer.js
index eb9ea1f5907..232da4d25c1 100644
--- a/addons/web/static/src/js/views/form/form_renderer.js
+++ b/addons/web/static/src/js/views/form/form_renderer.js
@@ -950,10 +950,7 @@ var FormRenderer = BasicRenderer.extend({
* @param {OdooEvent} ev
*/
_onNavigationMove: function (ev) {
- if (ev.data.direction !== "cancel") {
- ev.stopPropagation();
- }
-
+ ev.stopPropagation();
var index;
if (ev.data.direction === "next") {
index = this.allFieldWidgets[this.state.id].indexOf(ev.data.target || ev.target);