File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,6 @@ const Dialog: React.FC<IDialogPropTypes> = (props) => {
113113 const mouseDownOnMaskRef = useRef ( false ) ;
114114 const mouseUpOnMaskRef = useRef ( false ) ;
115115
116-
117-
118116 // >>> Wrapper
119117 // Close only when element not on dialog
120118 let onWrapperClick : ( e : React . SyntheticEvent ) => void = null ;
@@ -131,11 +129,11 @@ const Dialog: React.FC<IDialogPropTypes> = (props) => {
131129 } ;
132130 }
133131
134- function onModulesMouseDownCapture ( e : React . MouseEvent ) {
132+ function onWrapperMouseDownCapture ( e : React . MouseEvent ) {
135133 mouseDownOnMaskRef . current = e . target === wrapperRef . current ;
136134 }
137135
138- function onModulesMouseUpCapture ( e : React . MouseEvent ) {
136+ function onWrapperMouseUpCapture ( e : React . MouseEvent ) {
139137 mouseUpOnMaskRef . current = e . target === wrapperRef . current ;
140138 }
141139
@@ -161,8 +159,6 @@ const Dialog: React.FC<IDialogPropTypes> = (props) => {
161159 }
162160 } , [ visible ] ) ;
163161
164-
165-
166162 const mergedStyle : React . CSSProperties = {
167163 zIndex,
168164 ...wrapStyle ,
@@ -189,8 +185,8 @@ const Dialog: React.FC<IDialogPropTypes> = (props) => {
189185 className = { clsx ( `${ prefixCls } -wrap` , wrapClassName , modalClassNames ?. wrapper ) }
190186 ref = { wrapperRef }
191187 onClick = { onWrapperClick }
192- onMouseDownCapture = { onModulesMouseDownCapture }
193- onMouseUpCapture = { onModulesMouseUpCapture }
188+ onMouseDownCapture = { onWrapperMouseDownCapture }
189+ onMouseUpCapture = { onWrapperMouseUpCapture }
194190 style = { mergedStyle }
195191 { ...wrapProps }
196192 >
Original file line number Diff line number Diff line change 1-
21import React from 'react' ;
32import { render , fireEvent , act } from '@testing-library/react' ;
43import Dialog from '../src' ;
You can’t perform that action at this time.
0 commit comments