feat(context menu): prevent default context menu and emit event on elements

This commit is contained in:
DecDuck
2024-11-19 15:28:32 +11:00
parent af056c08d2
commit c560656a8f

View File

@ -17,6 +17,11 @@ export function setupHooks() {
listen("auth/finished", (event) => { listen("auth/finished", (event) => {
router.push("/store"); router.push("/store");
}); });
document.addEventListener("contextmenu", (event) => {
event.target?.dispatchEvent(new Event("contextmenu"));
event.preventDefault();
});
} }
export function initialNavigation(state: Ref<AppState>) { export function initialNavigation(state: Ref<AppState>) {