Skip to content

Commit

Permalink
Merge pull request #1919 from WordPress/update/with-focus-return-will…
Browse files Browse the repository at this point in the history
…-mount

withFocusReturn: Get the document activeElement before the component mounts.
  • Loading branch information
afercia committed Jul 17, 2017
2 parents dc0189a + 45dee22 commit 8bc5077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/higher-order/with-focus-return/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Component, findDOMNode } from 'element';
*/
function withFocusReturn( WrappedComponent ) {
return class extends Component {
componentDidMount() {
componentWillMount() {
this.activeElement = document.activeElement;
}

Expand Down

0 comments on commit 8bc5077

Please sign in to comment.