diff --git a/src/canvas/index.js b/src/canvas/index.js index dddc77bcb9..383eb33296 100644 --- a/src/canvas/index.js +++ b/src/canvas/index.js @@ -552,8 +552,12 @@ export default () => { */ isInputFocused() { const doc = this.getDocument(); + const frame = this.getFrameEl(); const toIgnore = ['body', ...this.getConfig().notTextable]; - const focused = doc && doc.activeElement; + const docActive = frame && document.activeElement === frame; + const focused = docActive + ? doc && doc.activeElement + : document.activeElement; return focused && !toIgnore.some(item => focused.matches(item)); }, diff --git a/src/canvas/view/CanvasView.js b/src/canvas/view/CanvasView.js index cb7d8a1c05..e9a6c7d05b 100644 --- a/src/canvas/view/CanvasView.js +++ b/src/canvas/view/CanvasView.js @@ -92,7 +92,11 @@ export default Backbone.View.extend({ const { em } = this; const key = getKeyChar(ev); - if (key === ' ' && em.getZoomDecimal() !== 1) { + if ( + key === ' ' && + em.getZoomDecimal() !== 1 && + !em.get('Canvas').isInputFocused() + ) { this.preventDefault(ev); em.get('Editor').runCommand('core:canvas-move'); }