diff --git a/docs/modules/Assets.md b/docs/modules/Assets.md index 6e07f6d20..fa3f36e8f 100644 --- a/docs/modules/Assets.md +++ b/docs/modules/Assets.md @@ -337,7 +337,7 @@ editor.on('asset:custom', props => { // props.close (Function) - A callback to close the Asset Manager // props.remove (Function) - A callback to remove an asset // props.select (Function) - A callback to select an asset - // props.container (HTMLElement) - The element where you can append your UI + // props.container (HTMLElement) - The element where you should append your UI // Here you would put the logic to render/update your UI. }); diff --git a/src/asset_manager/index.js b/src/asset_manager/index.js index a943f38d0..f22d763df 100644 --- a/src/asset_manager/index.js +++ b/src/asset_manager/index.js @@ -119,6 +119,9 @@ export default () => { __trgCustom: debounce(function() { const bhv = this.__getBehaviour(); + if (!bhv.container && !this.getConfig('custom').open) { + return; + } this.em.trigger(this.events.custom, { am: this, open: this.isOpen(),