Bug 1517349 - [release 115] Fix jsx-a11y/no-autofocus warnings (#7599). r=dwalsh
authorJason Laster <jlaster@mozilla.com>
Wed, 02 Jan 2019 17:01:17 -0500
changeset 509439 2ab1643a3ab7b82bc02e968f3bbec6cf039c8a7a
parent 509438 16cbe9f57457e1fe8485db36de4c2ef639e5a2b4
child 509440 1491b715fae4feb979a6fb6a3f0b1382d87062ef
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1517349
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517349 - [release 115] Fix jsx-a11y/no-autofocus warnings (#7599). r=dwalsh
devtools/client/debugger/new/src/components/SecondaryPanes/Expressions.js
devtools/client/debugger/new/src/components/SecondaryPanes/XHRBreakpoints.js
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Expressions.js
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Expressions.js
@@ -272,17 +272,17 @@ class Expressions extends Component<Prop
           })}
         </datalist>
       );
     }
     return <datalist id="autocomplete-matches" />;
   }
 
   renderNewExpressionInput() {
-    const { expressionError, showInput } = this.props;
+    const { expressionError } = this.props;
     const { editing, inputValue, focused } = this.state;
     const error = editing === false && expressionError === true;
     const placeholder: string = error
       ? L10N.getStr("expressions.errorMsg")
       : L10N.getStr("expressions.placeholder");
 
     return (
       <li
@@ -292,17 +292,16 @@ class Expressions extends Component<Prop
           <input
             className="input-expression"
             type="text"
             placeholder={placeholder}
             onChange={this.handleChange}
             onBlur={this.hideInput}
             onKeyDown={this.handleKeyDown}
             onFocus={this.onFocus}
-            autoFocus={showInput}
             value={!editing ? inputValue : ""}
             ref={c => (this._input = c)}
             {...features.autocompleteExpression && {
               list: "autocomplete-matches"
             }}
           />
           {this.renderAutoCompleteMatches()}
           <input type="submit" style={{ display: "none" }} />
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/XHRBreakpoints.js
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/XHRBreakpoints.js
@@ -126,33 +126,31 @@ class XHRBreakpoints extends Component<P
       inputMethod: method,
       editing: true,
       editIndex: index
     });
   };
 
   renderXHRInput(onSubmit) {
     const { focused, inputValue } = this.state;
-    const { showInput } = this.props;
     const placeholder = L10N.getStr("xhrBreakpoints.placeholder");
 
     return (
       <li
         className={classnames("xhr-input-container", { focused })}
         key="xhr-input"
       >
         <form className="xhr-input-form" onSubmit={onSubmit}>
           <input
             className="xhr-input"
             type="text"
             placeholder={placeholder}
             onChange={this.handleChange}
             onBlur={this.hideInput}
             onFocus={this.onFocus}
-            autoFocus={showInput}
             value={inputValue}
             ref={c => (this._input = c)}
           />
           <input type="submit" style={{ display: "none" }} />
         </form>
       </li>
     );
   }