File tree 1 file changed +5
-9
lines changed
1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ var ModalPortal = module.exports = React.createClass({
36
36
// Focus needs to be set when mounting and already open
37
37
if ( this . props . isOpen ) {
38
38
this . setFocusAfterRender ( true ) ;
39
+ this . open ( ) ;
39
40
}
40
- this . handleProps ( this . props ) ;
41
41
} ,
42
42
43
43
componentWillReceiveProps : function ( newProps ) {
@@ -46,7 +46,10 @@ var ModalPortal = module.exports = React.createClass({
46
46
this . setFocusAfterRender ( true ) ;
47
47
}
48
48
49
- this . handleProps ( newProps ) ;
49
+ if ( newProps . isOpen === true )
50
+ this . open ( ) ;
51
+ else if ( newProps . isOpen === false )
52
+ this . close ( ) ;
50
53
} ,
51
54
52
55
componentDidUpdate : function ( ) {
@@ -60,13 +63,6 @@ var ModalPortal = module.exports = React.createClass({
60
63
this . focusAfterRender = focus ;
61
64
} ,
62
65
63
- handleProps : function ( props ) {
64
- if ( props . isOpen === true )
65
- this . open ( ) ;
66
- else if ( props . isOpen === false )
67
- this . close ( ) ;
68
- } ,
69
-
70
66
open : function ( ) {
71
67
focusManager . setupScopedFocus ( this . getDOMNode ( ) ) ;
72
68
focusManager . markForFocusLater ( ) ;
You can’t perform that action at this time.
0 commit comments