mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
Focus last element when exiting modal
This commit is contained in:
parent
f0a53114b3
commit
e266cc0b99
1 changed files with 2 additions and 0 deletions
|
@ -77,10 +77,12 @@ const type = $computed(() => {
|
|||
|
||||
let contentClicking = false;
|
||||
|
||||
const focusedElement = document.activeElement;
|
||||
const close = () => {
|
||||
if (props.src) props.src.style.pointerEvents = 'auto';
|
||||
showing = false;
|
||||
emit('close');
|
||||
focusedElement.focus();
|
||||
};
|
||||
|
||||
const onBgClick = () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue