From c9716928a2eadf5d316d2c94cd4754bfafad1fce Mon Sep 17 00:00:00 2001 From: Andy Edwards Date: Wed, 30 Jun 2021 13:45:41 -0500 Subject: [PATCH] fix: revert workaround for #7 fix #68 If you're using MUI 3, you may see issue #7 happening again. If so, you'll need to investigate the issue with the authors of MUI/decide how to work around it yourself. --- package.json | 3 ++- src/core.js | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6c40f28..6c96130 100644 --- a/package.json +++ b/package.json @@ -153,6 +153,7 @@ "prop-types": "^15.7.2" }, "peerDependencies": { - "react": "^15.0.0 || ^16.0.0 || ^17.0.0" + "react": "^15.0.0 || ^16.0.0 || ^17.0.0", + "@material-ui/core": "^4.0.0" } } diff --git a/src/core.js b/src/core.js index fbfeae1..80c7908 100644 --- a/src/core.js +++ b/src/core.js @@ -118,13 +118,6 @@ export function createPopupState({ if (!parentPopupState.isOpen) return parentPopupState._setChildPopupState(popupState) } - if ( - !disableAutoFocus && - typeof document === 'object' && - document.activeElement - ) { - document.activeElement.blur() - } const newState: $Shape = { isOpen: true,