File tree 3 files changed +11
-10
lines changed
3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 1
1
var React = require ( 'react' ) ;
2
- var ExecutionEnvironment = require ( 'react/lib/ExecutionEnvironment' ) ;
2
+ var ReactDOM = require ( 'react-dom' ) ;
3
+ var ExecutionEnvironment = require ( 'exenv' ) ;
3
4
var ModalPortal = React . createFactory ( require ( './ModalPortal' ) ) ;
4
5
var ariaAppHider = require ( '../helpers/ariaAppHider' ) ;
5
6
var elementClass = require ( 'element-class' ) ;
@@ -50,7 +51,7 @@ var Modal = module.exports = React.createClass({
50
51
} ,
51
52
52
53
componentWillUnmount : function ( ) {
53
- React . unmountComponentAtNode ( this . node ) ;
54
+ ReactDOM . unmountComponentAtNode ( this . node ) ;
54
55
document . body . removeChild ( this . node ) ;
55
56
} ,
56
57
@@ -65,10 +66,7 @@ var Modal = module.exports = React.createClass({
65
66
ariaAppHider . toggle ( props . isOpen , props . appElement ) ;
66
67
}
67
68
sanitizeProps ( props ) ;
68
- if ( this . portal )
69
- this . portal . setProps ( props ) ;
70
- else
71
- this . portal = React . render ( ModalPortal ( props ) , this . node ) ;
69
+ this . portal = ReactDOM . render ( ModalPortal ( props ) , this . node ) ;
72
70
} ,
73
71
74
72
render : function ( ) {
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ var ModalPortal = module.exports = React.createClass({
103
103
} ,
104
104
105
105
open : function ( ) {
106
- focusManager . setupScopedFocus ( this . getDOMNode ( ) ) ;
106
+ focusManager . setupScopedFocus ( this . node ) ;
107
107
focusManager . markForFocusLater ( ) ;
108
108
this . setState ( { isOpen : true } , function ( ) {
109
109
this . setState ( { afterOpen : true } ) ;
@@ -120,7 +120,7 @@ var ModalPortal = module.exports = React.createClass({
120
120
} ,
121
121
122
122
focusContent : function ( ) {
123
- this . refs . content . getDOMNode ( ) . focus ( ) ;
123
+ this . refs . content . focus ( ) ;
124
124
} ,
125
125
126
126
closeWithTimeout : function ( ) {
@@ -142,7 +142,7 @@ var ModalPortal = module.exports = React.createClass({
142
142
} ,
143
143
144
144
handleKeyDown : function ( event ) {
145
- if ( event . keyCode == 9 /*tab*/ ) scopeTab ( this . refs . content . getDOMNode ( ) , event ) ;
145
+ if ( event . keyCode == 9 /*tab*/ ) scopeTab ( this . refs . content , event ) ;
146
146
if ( event . keyCode == 27 /*esc*/ ) this . requestClose ( ) ;
147
147
} ,
148
148
Original file line number Diff line number Diff line change 34
34
"karma-mocha" : " 0.2.0" ,
35
35
"karma-safari-launcher" : " ^0.1.1" ,
36
36
"mocha" : " 2.3.3" ,
37
- "react" : " >=0.13.3" ,
37
+ "exenv" : " 1.2.0" ,
38
+ "react-addons-test-utils" : " ^0.14.0" ,
39
+ "react-dom" : " ^0.14.0" ,
40
+ "react" : " ^0.14.0" ,
38
41
"reactify" : " ^1.1.1" ,
39
42
"rf-release" : " 0.4.0" ,
40
43
"uglify-js" : " 2.4.24" ,
You can’t perform that action at this time.
0 commit comments