@@ -130,13 +130,11 @@ var ModalPortal = module.exports = React.createClass({
130
130
}
131
131
} ,
132
132
133
- handleOverlayMouseDown : function ( event ) {
133
+ handleOverlayOnClick : function ( event ) {
134
134
if ( this . shouldClose === null ) {
135
135
this . shouldClose = true ;
136
136
}
137
- } ,
138
137
139
- handleOverlayMouseUp : function ( event ) {
140
138
if ( this . shouldClose && this . props . shouldCloseOnOverlayClick ) {
141
139
if ( this . ownerHandlesClose ( ) )
142
140
this . requestClose ( event ) ;
@@ -146,11 +144,7 @@ var ModalPortal = module.exports = React.createClass({
146
144
this . shouldClose = null ;
147
145
} ,
148
146
149
- handleContentMouseDown : function ( event ) {
150
- this . shouldClose = false ;
151
- } ,
152
-
153
- handleContentMouseUp : function ( event ) {
147
+ handleContentOnClick : function ( ) {
154
148
this . shouldClose = false ;
155
149
} ,
156
150
@@ -189,17 +183,15 @@ var ModalPortal = module.exports = React.createClass({
189
183
ref : "overlay" ,
190
184
className : this . buildClassName ( 'overlay' , this . props . overlayClassName ) ,
191
185
style : Assign ( { } , overlayStyles , this . props . style . overlay || { } ) ,
192
- onMouseDown : this . handleOverlayMouseDown ,
193
- onMouseUp : this . handleOverlayMouseUp
186
+ onClick : this . handleOverlayOnClick
194
187
} ,
195
188
div ( {
196
189
ref : "content" ,
197
190
style : Assign ( { } , contentStyles , this . props . style . content || { } ) ,
198
191
className : this . buildClassName ( 'content' , this . props . className ) ,
199
192
tabIndex : "-1" ,
200
193
onKeyDown : this . handleKeyDown ,
201
- onMouseDown : this . handleContentMouseDown ,
202
- onMouseUp : this . handleContentMouseUp ,
194
+ onClick : this . handleContentOnClick ,
203
195
role : this . props . role ,
204
196
"aria-label" : this . props . contentLabel
205
197
} ,
0 commit comments