From 6be8997807e4fbfeeefe273a335d9182490d0ac5 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 6 Jan 2021 08:27:57 +0000 Subject: [FIX] web: editable list: can unselect row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit [1], it is no longer possible to unselect a row in a one2many editable list if there is an html field in the form view. The reason is that there is a '.modal' element (several actually) in the DOM of the html field. This element is considered as an opened dialog by the list renderer, which is wrong. This commit refines the selector that determines whether there is an opened dialog or not. [1] 7d04ec7cca4f355295a06c1ce6f112b6cc533c87 closes odoo/odoo#64127 Signed-off-by: Géry Debongnie (ged) --- addons/web/static/src/js/views/list/list_editable_renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views') diff --git a/addons/web/static/src/js/views/list/list_editable_renderer.js b/addons/web/static/src/js/views/list/list_editable_renderer.js index 2122e00ed0c..a3c47684991 100644 --- a/addons/web/static/src/js/views/list/list_editable_renderer.js +++ b/addons/web/static/src/js/views/list/list_editable_renderer.js @@ -1817,7 +1817,7 @@ ListRenderer.include({ // ignore clicks if there is a modal, except if the list is in the last // (active) modal - var $modal = $('.modal:last'); + var $modal = $('body > .modal:last'); if ($modal.length) { var $listModal = this.$el.closest('.modal'); if ($modal.prop('id') !== $listModal.prop('id')) { -- cgit v1.2.3