mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 23:08:12 +09:00
revert history api
This commit is contained in:
parent
5047898fa6
commit
f3931c9087
@ -177,10 +177,10 @@ let contentClicking = false;
|
||||
|
||||
const focusedElement = document.activeElement;
|
||||
function close(ev, opts: { useSendAnimation?: boolean } = {}) {
|
||||
removeEventListener("popstate", close);
|
||||
if (props.preferType == "dialog") {
|
||||
history.forward();
|
||||
}
|
||||
// removeEventListener("popstate", close);
|
||||
// if (props.preferType == "dialog") {
|
||||
// history.forward();
|
||||
// }
|
||||
if (opts.useSendAnimation) {
|
||||
useSendAnime = true;
|
||||
}
|
||||
@ -358,10 +358,10 @@ const onOpened = () => {
|
||||
},
|
||||
{ passive: true }
|
||||
);
|
||||
if (props.preferType == "dialog") {
|
||||
history.pushState(null, "", location.href);
|
||||
}
|
||||
addEventListener("popstate", close);
|
||||
// if (props.preferType == "dialog") {
|
||||
// history.pushState(null, "", location.href);
|
||||
// }
|
||||
// addEventListener("popstate", close);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
@ -388,10 +388,10 @@ onMounted(() => {
|
||||
});
|
||||
});
|
||||
onUnmounted(() => {
|
||||
removeEventListener("popstate", close);
|
||||
if (props.preferType == "dialog") {
|
||||
history.back();
|
||||
}
|
||||
// removeEventListener("popstate", close);
|
||||
// if (props.preferType == "dialog") {
|
||||
// history.back();
|
||||
// }
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
|
Loading…
Reference in New Issue
Block a user