From 125668e0e2cc8daeb05c92f177e9ef8a1ad20c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 3 Jul 2025 16:24:59 +0200 Subject: [PATCH] Do not change the selection of row when starting the edition The edition of tree row relies on having the current record of the screen set to the row edited. This can be only guarantee if we do not change the selection. Closes #14097 --- sao/src/view/tree.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sao/src/view/tree.js b/sao/src/view/tree.js index 87e6e905e0..2a878061dc 100644 --- a/sao/src/view/tree.js +++ b/sao/src/view/tree.js @@ -2232,11 +2232,13 @@ } listener.on('click.sao.editabletree', handler); - Sao.View.Tree.RowEditable._super.select_row.call(this, event_); - + // do not call super when editing row because the selection must + // not be changed if (!event_.shiftKey && !(event_.ctrlKey || event_.metaKey) && (this.record === current_record)) { this.tree.edit_row(this); + } else { + Sao.View.Tree.RowEditable._super.select_row.call(this, event_); } }, unset_editable: function() {