summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/list
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2021-01-06 08:27:57 +0000
committerAaron Bohy <aab@odoo.com>2021-01-06 08:36:15 +0000
commit6be8997807e4fbfeeefe273a335d9182490d0ac5 (patch)
tree4bbc9e825d3b55df9de5273654c10a81d264fe9e /addons/web/static/src/js/views/list
parent061190123dc21001aaff6b19cf9a417b390a576a (diff)
[FIX] web: editable list: can unselect row
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) <ged@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/list')
-rw-r--r--addons/web/static/src/js/views/list/list_editable_renderer.js2
1 files changed, 1 insertions, 1 deletions
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')) {