一部のmodalのフォーカストラップが外れない問題を修正
This commit is contained in:
parent
93b2b9818a
commit
8f602b7656
|
@ -30,7 +30,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
[$style.transition_modal_leaveTo]: transitionName === 'modal',
|
[$style.transition_modal_leaveTo]: transitionName === 'modal',
|
||||||
[$style.transition_send_leaveTo]: transitionName === 'send',
|
[$style.transition_send_leaveTo]: transitionName === 'send',
|
||||||
})"
|
})"
|
||||||
:duration="transitionDuration" appear @afterLeave="emit('closed')" @enter="emit('opening')" @afterEnter="onOpened"
|
:duration="transitionDuration" appear @afterLeave="onClosed" @enter="emit('opening')" @afterEnter="onOpened"
|
||||||
>
|
>
|
||||||
<div v-show="manualShowing != null ? manualShowing : showing" ref="modalRootEl" v-hotkey.global="keymap" :class="[$style.root, { [$style.drawer]: type === 'drawer', [$style.dialog]: type === 'dialog', [$style.popup]: type === 'popup' }]" :style="{ zIndex, pointerEvents: (manualShowing != null ? manualShowing : showing) ? 'auto' : 'none', '--transformOrigin': transformOrigin }">
|
<div v-show="manualShowing != null ? manualShowing : showing" ref="modalRootEl" v-hotkey.global="keymap" :class="[$style.root, { [$style.drawer]: type === 'drawer', [$style.dialog]: type === 'dialog', [$style.popup]: type === 'popup' }]" :style="{ zIndex, pointerEvents: (manualShowing != null ? manualShowing : showing) ? 'auto' : 'none', '--transformOrigin': transformOrigin }">
|
||||||
<div data-cy-bg :data-cy-transparent="isEnableBgTransparent" class="_modalBg" :class="[$style.bg, { [$style.bgTransparent]: isEnableBgTransparent }]" :style="{ zIndex }" @click="onBgClick" @mousedown="onBgClick" @contextmenu.prevent.stop="() => {}"></div>
|
<div data-cy-bg :data-cy-transparent="isEnableBgTransparent" class="_modalBg" :class="[$style.bg, { [$style.bgTransparent]: isEnableBgTransparent }]" :style="{ zIndex }" @click="onBgClick" @mousedown="onBgClick" @contextmenu.prevent.stop="() => {}"></div>
|
||||||
|
@ -307,6 +307,11 @@ const onOpened = () => {
|
||||||
}, { passive: true });
|
}, { passive: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onClosed = () => {
|
||||||
|
releaseFocusTrap?.();
|
||||||
|
emit('closed');
|
||||||
|
};
|
||||||
|
|
||||||
const alignObserver = new ResizeObserver((entries, observer) => {
|
const alignObserver = new ResizeObserver((entries, observer) => {
|
||||||
align();
|
align();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue