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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
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' |
|
|
|
); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|