diff --git a/api/js/etemplate/et2_widget_toolbar.ts b/api/js/etemplate/et2_widget_toolbar.ts index f2b6430b3f..8ac1a662f9 100644 --- a/api/js/etemplate/et2_widget_toolbar.ts +++ b/api/js/etemplate/et2_widget_toolbar.ts @@ -493,6 +493,17 @@ export class et2_toolbar extends et2_DOMWidget implements et2_IInput tolerance:"touch" }); + toolbox.on('toggle', (e)=>{ + const details = e.target; + if (details.open) + { + jQuery('html').on('click.outsideOfMenu', function(e){ + if (e.target != details && e.target != details.firstChild) details.open = false; + jQuery('html').unbind('click.outsideOfMenu'); + }); + } + }); + this.actionlist.droppable({ tolerance:"pointer", drop:function (event,ui) {