mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 20:49:06 +01:00
Focus last element when exiting modal
This commit is contained in:
parent
f0a53114b3
commit
e266cc0b99
@ -77,10 +77,12 @@ const type = $computed(() => {
|
|||||||
|
|
||||||
let contentClicking = false;
|
let contentClicking = false;
|
||||||
|
|
||||||
|
const focusedElement = document.activeElement;
|
||||||
const close = () => {
|
const close = () => {
|
||||||
if (props.src) props.src.style.pointerEvents = 'auto';
|
if (props.src) props.src.style.pointerEvents = 'auto';
|
||||||
showing = false;
|
showing = false;
|
||||||
emit('close');
|
emit('close');
|
||||||
|
focusedElement.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onBgClick = () => {
|
const onBgClick = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user