@@ -130,13 +130,11 @@ var ModalPortal = module.exports = React.createClass({
130130 }
131131 } ,
132132
133- handleOverlayMouseDown : function ( event ) {
133+ handleOverlayOnClick : function ( event ) {
134134 if ( this . shouldClose === null ) {
135135 this . shouldClose = true ;
136136 }
137- } ,
138137
139- handleOverlayMouseUp : function ( event ) {
140138 if ( this . shouldClose && this . props . shouldCloseOnOverlayClick ) {
141139 if ( this . ownerHandlesClose ( ) )
142140 this . requestClose ( event ) ;
@@ -146,11 +144,7 @@ var ModalPortal = module.exports = React.createClass({
146144 this . shouldClose = null ;
147145 } ,
148146
149- handleContentMouseDown : function ( event ) {
150- this . shouldClose = false ;
151- } ,
152-
153- handleContentMouseUp : function ( event ) {
147+ handleContentOnClick : function ( ) {
154148 this . shouldClose = false ;
155149 } ,
156150
@@ -189,17 +183,15 @@ var ModalPortal = module.exports = React.createClass({
189183 ref : "overlay" ,
190184 className : this . buildClassName ( 'overlay' , this . props . overlayClassName ) ,
191185 style : Assign ( { } , overlayStyles , this . props . style . overlay || { } ) ,
192- onMouseDown : this . handleOverlayMouseDown ,
193- onMouseUp : this . handleOverlayMouseUp
186+ onClick : this . handleOverlayOnClick
194187 } ,
195188 div ( {
196189 ref : "content" ,
197190 style : Assign ( { } , contentStyles , this . props . style . content || { } ) ,
198191 className : this . buildClassName ( 'content' , this . props . className ) ,
199192 tabIndex : "-1" ,
200193 onKeyDown : this . handleKeyDown ,
201- onMouseDown : this . handleContentMouseDown ,
202- onMouseUp : this . handleContentMouseUp ,
194+ onClick : this . handleContentOnClick ,
203195 role : this . props . role ,
204196 "aria-label" : this . props . contentLabel
205197 } ,
0 commit comments