Browse Source

Merge pull request #1359 from nojacko/dev

Prevent error when there's no activeElement during undo/redo
pull/1371/head
Artur Arseniev 8 years ago
committed by GitHub
parent
commit
1cac4b156e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/canvas/index.js

6
src/canvas/index.js

@ -363,7 +363,11 @@ module.exports = () => {
* @return {Boolean}
*/
isInputFocused() {
return this.getFrameEl().contentDocument.activeElement.tagName !== 'BODY';
let contentDocument = this.getFrameEl().contentDocument;
return (
contentDocument.activeElement &&
contentDocument.activeElement.tagName !== 'BODY'
);
},
/**

Loading…
Cancel
Save