Closed Sega100500 closed 1 year ago
I find difference between 3.3.12 and 3.3.13 (and later) in jstree.js
:
if(!this.settings.core.multiple && (e.metaKey || e.ctrlKey || e.shiftKey) && this.is_selected(obj)) {
this.deselect_node(obj, false, e);
}
else {
this.deselect_all(true);
this.select_node(obj, false, false, e);
this._data.core.last_clicked = this.get_node(obj);
}
if(!this.settings.core.multiple && (e.metaKey || e.ctrlKey || e.shiftKey) && this.is_selected(obj)) {
this.deselect_node(obj, false, e);
}
else {
if (!this.is_selected(obj) || this._data.core.selected.length !== 1) {
this.deselect_all(true);
this.select_node(obj, false, false, e);
}
this._data.core.last_clicked = this.get_node(obj);
}
Everything seems to be correct, but even the selected node should receive at least some event that it is selected again. For example, in my case it is useful for reloading content via ajax.
Otherwise, the selected node is completely excluded from receiving events about its selection again.
Please fix this.
Added the allow_reselect option to core config - set it to true, to revert the problematic change.
Selected node not fire event when select again
After upgrade jsTree from 3.3.12 to 3.3.15 selected node not fire event on select again
When first time select node - it fire event, when try again to select (by mouse click) selected node - no events fire.