From 024e58b716dab0f45366abc80a21e8200c3ddab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 16 Apr 2024 09:16:24 +0200 Subject: [PATCH] Use jQuery remove to remove children row elements We can not rely on the row node to always have a parent node as toggle_row is a callback to an event that can be executed after the row has already be removed from the DOM. Closes #13198 (grafted from 7e3ab58418656857275f3888386d840ca336858f) --HG-- branch : 7.0 --- sao/src/view/tree.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sao/src/view/tree.js b/sao/src/view/tree.js index 2439661d9d..b0aeafe121 100644 --- a/sao/src/view/tree.js +++ b/sao/src/view/tree.js @@ -1828,8 +1828,7 @@ collapse_children: function() { for (const row of this.rows) { row.collapse_children(); - var node = row.el[0]; - node.parentNode.removeChild(node); + row.el.remove(); } this.rows = []; },