Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

fix: avoid redirection on node inline action button

Smaug67395b7c00f45fa9
diff --git a/frontend/app/components/Node/Resource/Inline.vue b/frontend/app/components/Node/Resource/Inline.vue
index 9566c8f2..c389cae3 100644
--- a/frontend/app/components/Node/Resource/Inline.vue
+++ b/frontend/app/components/Node/Resource/Inline.vue
@@ -7,10 +7,10 @@
<span class="file-size">{{ readableFileSize(node.size ?? 0) }}</span>
</div>
- <button v-if="editable" class="btn-icon file-edit" @click="openDrawioEditor">
+ <button v-if="editable" class="btn-icon file-edit" @click.prevent="openDrawioEditor">
<Icon name="edit" />
</button>
- <button class="btn-icon file-remove" @click="openDeleteModal">
+ <button class="btn-icon file-remove" @click.prevent="openDeleteModal">
<Icon name="close" />
</button>
</NuxtLink>
@@ -36,8 +36,7 @@ const openDeleteModal = () => {
useModal().add(new Modal(shallowRef(NodeDeleteModal), { size: 'small', props: { node: props.node, redirect: '/dashboard' } }));
};
-function openDrawioEditor(e: MouseEvent) {
- e.preventDefault();
+function openDrawioEditor() {
const modalManager = useModal();
const modal = new Modal(shallowRef(DrawioEditorModal), {
props: {