File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export default class NumberEditor extends React.Component {
2323 }
2424
2525 componentDidMount ( ) {
26+ this . inputRef . current . focus ( ) ;
2627 this . inputRef . current . setSelectionRange ( 0 , String ( this . state . value ) . length ) ;
2728 document . body . addEventListener ( 'click' , this . checkExternalClick ) ;
2829 document . body . addEventListener ( 'touchend' , this . checkExternalClick ) ;
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export default class StringEditor extends React.Component {
2323 }
2424
2525 componentDidMount ( ) {
26+ this . inputRef . current . focus ( ) ;
2627 this . inputRef . current . setSelectionRange ( 0 , this . state . value . length ) ;
2728 document . body . addEventListener ( 'click' , this . checkExternalClick ) ;
2829 document . body . addEventListener ( 'touchend' , this . checkExternalClick ) ;
You can’t perform that action at this time.
0 commit comments