Skip to content

Commit

Permalink
Editable: Auto-focus the link input
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 12, 2017
1 parent 1f159f6 commit 7c48392
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions blocks/editable/format-toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class FormatToolbar extends wp.element.Component {
} );
}

/* eslint-disable jsx-a11y/no-autofocus */
return (
<div className="editable-format-toolbar">
<Toolbar controls={ toolbarControls } />
Expand All @@ -134,6 +135,7 @@ class FormatToolbar extends wp.element.Component {
style={ linkStyle }
onSubmit={ this.submitLink }>
<input
autoFocus
className="editable-format-toolbar__link-input"
type="url"
required
Expand All @@ -156,6 +158,7 @@ class FormatToolbar extends wp.element.Component {
}
</div>
);
/* eslint-enable jsx-a11y/no-autofocus */
}
}

Expand Down

0 comments on commit 7c48392

Please sign in to comment.