vakata / jstree

jquery tree plugin
http://jstree.com
MIT License
5.15k stars 1.38k forks source link

select_node / activate_node no loger trigged when clicking on a selected node #2691

Closed Paradoxnode closed 1 year ago

Paradoxnode commented 1 year ago

Starting from version 3.3.13 if a selected node gets selected neither select_node or activate_node event gets triggered.

I suspect that this issue is caused by commit e6e6d9ad998e15e8291697e44238e3a389a12c8b

vakata commented 1 year ago

I believe this is by design - a selected not is already selected, so the user should not be able to select it again (I believe this was in the original bug report). The idea of this change is to no trigger any events if only a single node is selected in the tree, and it is selected again. Is this the issue?

Paradoxnode commented 1 year ago

I do agree that selected_node shouldn't trigger if an user selects an already selected node. However activate_node event should trigger. As it says in the docs "triggered when an node is clicked or intercated with by the user".

I have have a scenario where i need to track if a user clicks on a node (selected or not) and up to version 3.3.12 it was working fine.

vakata commented 1 year ago

activate_node is still triggered: https://jsfiddle.net/pf2L9anu/