File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,14 @@ export default class ModalPortal extends Component {
9191 this . focusAfterRender = focus ;
9292 }
9393
94+ setOverlayRef = ( overlay ) => {
95+ this . overlay = overlay ;
96+ }
97+
98+ setContentRef = ( content ) => {
99+ this . content = content ;
100+ }
101+
94102 afterClose = ( ) => {
95103 focusManager . returnFocus ( ) ;
96104 focusManager . teardownScopedFocus ( ) ;
@@ -209,12 +217,12 @@ export default class ModalPortal extends Component {
209217
210218 return this . shouldBeClosed ( ) ? < div /> : (
211219 < div
212- ref = { overlay => { this . overlay = overlay ; } }
220+ ref = { this . setOverlayRef }
213221 className = { this . buildClassName ( 'overlay' , overlayClassName ) }
214222 style = { { ...overlayStyles , ...this . props . style . overlay } }
215223 onClick = { this . handleOverlayOnClick } >
216224 < div
217- ref = { content => { this . content = content ; } }
225+ ref = { this . setContentRef }
218226 style = { { ...contentStyles , ...this . props . style . content } }
219227 className = { this . buildClassName ( 'content' , className ) }
220228 tabIndex = "-1"
You can’t perform that action at this time.
0 commit comments