fix: focus on last active element when dialog closes (#3447)

* fix: focus on last active element when dialog closes

* useState instead of ref
This commit is contained in:
Aakansha Doshi 2021-04-15 20:29:00 +05:30 committed by GitHub
parent 793b69e592
commit c0047269c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 14 deletions

View file

@ -671,10 +671,6 @@ const LayerUI = ({
{appState.showHelpDialog && (
<HelpDialog
onClose={() => {
const helpIcon = document.querySelector(
".help-icon",
)! as HTMLElement;
helpIcon.focus();
setAppState({ showHelpDialog: false });
}}
/>