Skip to content

Commit

Permalink
Editor: Fix autoFocus logic for IE no-focus
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Apr 17, 2020
1 parent 3cf9f96 commit a121e47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/editor/src/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ class PostTitle extends Component {
*/
/* eslint-disable jsx-a11y/no-autofocus */
autoFocus={
document.body === document.activeElement &&
( document.body === document.activeElement ||
! document.activeElement ) &&
isCleanNewPost
}
/* eslint-enable jsx-a11y/no-autofocus */
Expand Down

0 comments on commit a121e47

Please sign in to comment.