diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-card.js index 96aa12a814..b4cbe39b56 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card.js @@ -43,11 +43,20 @@ export default Component.extend({ return htmlSafe(baseStyles); }), - toolbarStyle: computed('toolbarWidth', 'toolbarHeight', function () { + toolbarStyle: computed('showToolbar', 'toolbarWidth', 'toolbarHeight', function () { + let showToolbar = this.get('showToolbar'); let width = this.get('toolbarWidth'); let height = this.get('toolbarHeight'); + let styles = []; - return htmlSafe(`top: -${height}px; left: calc(50% - ${width / 2}px)`); + styles.push(`top: -${height}px`); + styles.push(`left: calc(50% - ${width / 2}px)`); + + if (!showToolbar) { + styles.push('pointer-events: none !important'); + } + + return htmlSafe(styles.join('; ')); }), didReceiveAttrs() { diff --git a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card-html.hbs b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card-html.hbs index 4b31bcec1a..1ba11ce4a2 100644 --- a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card-html.hbs +++ b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card-html.hbs @@ -1,5 +1,5 @@ {{#koenig-card - class=(concat (kg-style "media-card") " mih10 miw-100 tc") + class=(concat (kg-style "media-card") " mih10 miw-100 tc relative") toolbar=toolbar isSelected=isSelected isEditing=isEditing diff --git a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card.hbs b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card.hbs index 2465241447..a875c48dbb 100644 --- a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card.hbs +++ b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card.hbs @@ -3,7 +3,7 @@ {{yield}} {{#if toolbar}} -