From 827c0243f41da2c9d0f5288f6cd81e76b6858963 Mon Sep 17 00:00:00 2001 From: Hans-Peter Stoerr Date: Thu, 8 Dec 2022 15:34:06 +0100 Subject: [PATCH] delay selection until nodes are actually loaded --- .../root/libs/composum/nodes/commons/components/js/tree.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commons/src/main/resources/root/libs/composum/nodes/commons/components/js/tree.js b/commons/src/main/resources/root/libs/composum/nodes/commons/components/js/tree.js index 5d40681ddb..50a3360e66 100644 --- a/commons/src/main/resources/root/libs/composum/nodes/commons/components/js/tree.js +++ b/commons/src/main/resources/root/libs/composum/nodes/commons/components/js/tree.js @@ -472,11 +472,13 @@ if (this.log.getLevel() <= log.levels.DEBUG) { this.log.debug(this.nodeIdPrefix + 'tree.onPathInserted(' + parentPath + ',' + nodeName + ')>>>:' + nodeId); } + this.preventFromSelect = true; // nodes have to be loaded before being selected this.ensureNodeExists(parentPath, _.bind(function () { this.refreshNodeById(nodeId, _.bind(function () { if (this.log.getLevel() <= this.log.levels.DEBUG) { this.log.debug(this.nodeIdPrefix + 'tree.onPathInserted(' + parentPath + ',' + nodeName + ').exit.'); } + this.preventFromSelect = false; }, this)); }, this)); },