fix: stop the browser back button creating extra notes (#29645)

This commit is contained in:
G30 2026-09-04 15:54:10 -04:00 committed by GitHub
parent bd0b3875ba
commit b49db6f287
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -534,7 +534,7 @@
{
label: $i18n.t('Create a new note'),
onClick: async () => {
await goto(`/notes?content=${query}`);
await goto(`/notes/new?content=${encodeURIComponent(query)}`);
show = false;
onClose();
},

View file

@ -24,7 +24,7 @@
const res = await createNoteHandler(title, content);
if (res) {
goto(`/notes/${res.id}`);
goto(`/notes/${res.id}`, { replaceState: true });
}
return;
}

View file

@ -14,7 +14,7 @@
const res = await createNoteHandler(title, content);
if (res) {
goto(`/notes/${res.id}`);
goto(`/notes/${res.id}`, { replaceState: true });
}
});
</script>