mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 09:57:29 -07:00
label to close button
This commit is contained in:
parent
a15e1537e0
commit
8b210250e4
2 changed files with 1 additions and 7 deletions
|
@ -179,7 +179,6 @@ let transitionDuration = $computed(() =>
|
||||||
|
|
||||||
let contentClicking = false;
|
let contentClicking = false;
|
||||||
|
|
||||||
// const focusedElement = document.activeElement;
|
|
||||||
function close(ev, opts: { useSendAnimation?: boolean } = {}) {
|
function close(ev, opts: { useSendAnimation?: boolean } = {}) {
|
||||||
// removeEventListener("popstate", close);
|
// removeEventListener("popstate", close);
|
||||||
// if (props.preferType == "dialog") {
|
// if (props.preferType == "dialog") {
|
||||||
|
@ -193,16 +192,10 @@ function close(ev, opts: { useSendAnimation?: boolean } = {}) {
|
||||||
if (props.src) props.src.style.pointerEvents = "auto";
|
if (props.src) props.src.style.pointerEvents = "auto";
|
||||||
showing = false;
|
showing = false;
|
||||||
emit("close");
|
emit("close");
|
||||||
// if (!props.noReturnFocus) {
|
|
||||||
// focusedElement.focus();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onBgClick() {
|
function onBgClick() {
|
||||||
if (contentClicking) return;
|
if (contentClicking) return;
|
||||||
// if (!props.noReturnFocus) {
|
|
||||||
// focusedElement.focus();
|
|
||||||
// }
|
|
||||||
emit("click");
|
emit("click");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
:aria-label="i18n.t('close')"
|
:aria-label="i18n.t('close')"
|
||||||
class="_button"
|
class="_button"
|
||||||
@click="$emit('close')"
|
@click="$emit('close')"
|
||||||
|
v-tooltip="i18n.ts.close"
|
||||||
>
|
>
|
||||||
<i class="ph-x ph-bold ph-lg"></i>
|
<i class="ph-x ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in a new issue