mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
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:
parent
793b69e592
commit
c0047269c1
5 changed files with 15 additions and 14 deletions
|
@ -671,10 +671,6 @@ const LayerUI = ({
|
|||
{appState.showHelpDialog && (
|
||||
<HelpDialog
|
||||
onClose={() => {
|
||||
const helpIcon = document.querySelector(
|
||||
".help-icon",
|
||||
)! as HTMLElement;
|
||||
helpIcon.focus();
|
||||
setAppState({ showHelpDialog: false });
|
||||
}}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue