In order to solve XWIKI-21851, we can make use of an improvement introduced in JSTree 3.3.16 .
Note that this is the only change added in 3.3.16 ^^' https://github.com/vakata/jstree/releases/tag/3.3.16