Skip to content

Commit

Permalink
Fix: UrlInput autoFocus Issue With Custom Block (#6197)
Browse files Browse the repository at this point in the history
* Issue #6196: Add option to set autofocus true/false. Default can be true.

* Assign default value as a true.
  • Loading branch information
yahilmadakiya authored and danielbachhuber committed May 10, 2018
1 parent 9d9057b commit 2b76039
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/components/url-input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ class UrlInput extends Component {
}

render() {
const { value = '', instanceId } = this.props;
const { value = '', autoFocus = true, instanceId } = this.props;
const { showSuggestions, posts, selectedSuggestion, loading } = this.state;
/* eslint-disable jsx-a11y/no-autofocus */
return (
<div className="editor-url-input">
<input
autoFocus
autoFocus={ autoFocus }
type="text"
aria-label={ __( 'URL' ) }
required
Expand Down

0 comments on commit 2b76039

Please sign in to comment.