File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed 
packages/material-ui/src/InputBase Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,7 @@ class InputBase extends React.Component {
172172    } 
173173  } 
174174
175-   componentDidUpdate ( prevProps )  { 
176-     // Book keep the focused state. 
177-     if  ( ! prevProps . disabled  &&  this . props . disabled )  { 
178-       const  {  muiFormControl }  =  this . props ; 
179-       if  ( muiFormControl  &&  muiFormControl . onBlur )  { 
180-         muiFormControl . onBlur ( ) ; 
181-       } 
182-     } 
175+   componentDidUpdate ( )  { 
183176    if  ( this . isControlled )  { 
184177      this . checkDirty ( this . props ) ; 
185178    }  // else performed in the onChange 
Original file line number Diff line number Diff line change @@ -75,8 +75,7 @@ describe('<InputBase />', () => {
7575    } ) ; 
7676
7777    it ( 'should reset the focused state' ,  ( )  =>  { 
78-       const  handleBlur  =  spy ( ) ; 
79-       const  wrapper  =  mount ( < InputBase  muiFormControl = { {  onBlur : handleBlur  } }  /> ) ; 
78+       const  wrapper  =  mount ( < InputBase  /> ) ; 
8079      // We simulate a focused input that is getting disabled. 
8180      setState ( wrapper ,  { 
8281        focused : true , 
@@ -85,7 +84,6 @@ describe('<InputBase />', () => {
8584        disabled : true , 
8685      } ) ; 
8786      assert . strictEqual ( wrapper . find ( 'InputBase' ) . state ( ) . focused ,  false ) ; 
88-       assert . strictEqual ( handleBlur . callCount ,  1 ) ; 
8987    } ) ; 
9088
9189    // IE 11 bug 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments