Browse Source
Disable ModalWrap focus grab if lastFocus is inside it already
gre-patch-1
Juan Cortes Ross
6 years ago
No known key found for this signature in database
GPG Key ID: 34A99C03E9455EB8
1 changed files with
1 additions and
2 deletions
-
src/components/base/Modal/index.js
|
|
@ -186,8 +186,7 @@ export class Modal extends Component<Props> { |
|
|
|
focusWrapper = () => { |
|
|
|
// Forced to use findDOMNode here, because innerRef is giving a proxied component
|
|
|
|
const domWrapper = findDOMNode(this._wrapper) // eslint-disable-line react/no-find-dom-node
|
|
|
|
|
|
|
|
if (domWrapper instanceof HTMLDivElement) { |
|
|
|
if (domWrapper instanceof HTMLDivElement && !domWrapper.contains(this._lastFocusedElement)) { |
|
|
|
domWrapper.focus() |
|
|
|
} |
|
|
|
} |
|
|
|