From 52723ef0525d2044c3df7f0359b601fd9326394a Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 10 Jul 2012 16:33:23 +0200 Subject: [PATCH] [FIX] monkey around keyboard handling to ensure we don't cancel a cancelled edition or any other such thing. maybe the form should be explicitly blurred when saved/cancelled? bzr revid: xmo@openerp.com-20120710143323-fye927s9k455mqls --- addons/web/static/src/js/view_list_editable.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index 7bc12b325fc..b225af4cb0c 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -365,6 +365,7 @@ openerp.web.list_editable = function (instance) { }); }, keyup_ENTER: function () { + if (!this.editor.isEditing()) { return; } var self = this; return this.saveEdition().pipe(function (saveInfo) { if (saveInfo.created) { @@ -375,6 +376,7 @@ openerp.web.list_editable = function (instance) { }); }, keyup_ESCAPE: function () { + if (!this.editor.isEditing()) { return; } return this.cancelEdition(); } });