summaryrefslogtreecommitdiff
path: root/program/js/treelist.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/treelist.js')
-rw-r--r--program/js/treelist.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 08e0e686d..6f7bfbef7 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -248,6 +248,11 @@ function rcube_treelist_widget(node, p)
*/
function select(id)
{
+ // allow subscribes to prevent selection change
+ if (me.triggerEvent('beforeselect', indexbyid[id]) === false) {
+ return;
+ }
+
if (selection) {
id2dom(selection, true).removeClass('selected').removeAttr('aria-selected');
if (search_active)