From f8d3e988d805109aa015b1402f3370112d61fe2a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 31 Dec 2020 04:20:01 +0100 Subject: [PATCH] Hide properly the toolbat on preview on. Fixes #3209 --- src/commands/view/Preview.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/view/Preview.js b/src/commands/view/Preview.js index 06d966fe1..15a6f2db7 100644 --- a/src/commands/view/Preview.js +++ b/src/commands/view/Preview.js @@ -19,7 +19,10 @@ export default { const { em } = this; const mthEv = on ? 'on' : 'off'; if (em) { - const body = em.get('Canvas').getBody(); + const canvas = em.get('Canvas'); + const body = canvas.getBody(); + const tlb = canvas.getToolbarEl(); + tlb && (tlb.style.display = on ? 'none' : ''); const elP = body.querySelectorAll(`.${this.ppfx}no-pointer`); each(elP, item => (item.style.pointerEvents = on ? 'all' : '')); em[mthEv]('run:tlb-move:before', this.preventDrag);