File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 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({
3636 // Focus needs to be set when mounting and already open
3737 if ( this . props . isOpen ) {
3838 this . setFocusAfterRender ( true ) ;
39+ this . open ( ) ;
3940 }
40- this . handleProps ( this . props ) ;
4141 } ,
4242
4343 componentWillReceiveProps : function ( newProps ) {
@@ -46,7 +46,10 @@ var ModalPortal = module.exports = React.createClass({
4646 this . setFocusAfterRender ( true ) ;
4747 }
4848
49- this . handleProps ( newProps ) ;
49+ if ( newProps . isOpen === true )
50+ this . open ( ) ;
51+ else if ( newProps . isOpen === false )
52+ this . close ( ) ;
5053 } ,
5154
5255 componentDidUpdate : function ( ) {
@@ -60,13 +63,6 @@ var ModalPortal = module.exports = React.createClass({
6063 this . focusAfterRender = focus ;
6164 } ,
6265
63- handleProps : function ( props ) {
64- if ( props . isOpen === true )
65- this . open ( ) ;
66- else if ( props . isOpen === false )
67- this . close ( ) ;
68- } ,
69-
7066 open : function ( ) {
7167 focusManager . setupScopedFocus ( this . getDOMNode ( ) ) ;
7268 focusManager . markForFocusLater ( ) ;
You can’t perform that action at this time.
0 commit comments