@@ -51,6 +51,12 @@ var TutorialConfig = (function (_super) {
5151 TopPanel_1 . topElement . toggle ( false ) ;
5252 document . getElementsByTagName ( 'input' ) [ 0 ] . focus ( ) ;
5353 } ;
54+ TutorialConfig . prototype . shouldComponentUpdate = function ( ) {
55+ if ( document . activeElement &&
56+ typeof document . activeElement . value === 'string' ) {
57+ return false ;
58+ }
59+ } ;
5460 TutorialConfig . prototype . onSubmit = function ( values ) {
5561 var name = values . name , language = values . language , runner = values . runner ;
5662 this . props . save ( Object . assign ( { } , this . props . packageJson , {
@@ -65,16 +71,18 @@ var TutorialConfig = (function (_super) {
6571 return ( React . createElement ( Card_1 . Card , { style : styles . card } ,
6672 React . createElement ( Card_1 . CardHeader , { title : 'Tutorial Configuration' } ) ,
6773 React . createElement ( "form" , { onSubmit : handleSubmit ( this . onSubmit . bind ( this ) ) } ,
68- React . createElement ( redux_form_1 . Field , { name : 'name' , component : textField_1 . default . bind ( null , {
74+ React . createElement ( redux_form_1 . Field , { id : 'name' , name : 'name' , component : textField_1 . default . bind ( null , {
6975 hintText : 'coderoad-tutorial-name' ,
7076 } ) } ) ,
7177 React . createElement ( redux_form_1 . Field , { name : 'language' , component : selectField_1 . default . bind ( null , {
7278 children : languageItems_1 . default ( ) ,
7379 floatingLabelText : 'language' ,
80+ id : 'language' ,
7481 } ) } ) ,
7582 React . createElement ( redux_form_1 . Field , { name : 'runner' , component : selectField_1 . default . bind ( null , {
7683 children : runnerItems_1 . default ( 'JS' ) ,
7784 floatingLabelText : 'Test Runner' ,
85+ id : 'runner' ,
7886 } ) } ) ,
7987 React . createElement ( RaisedButton_1 . default , { type : 'submit' , style : styles . button , label : 'Save' , primary : true , disabled : invalid } ) ,
8088 React . createElement ( RaisedButton_1 . default , { style : styles . button , label : 'Continue' , secondary : true , disabled : invalid , onTouchTap : this . props . routeToPage . bind ( this ) } ) ) ) ) ;
0 commit comments