Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix tab dragging issue
zadam027b3eaed87f
diff --git a/src/public/javascripts/dialogs/import.js b/src/public/javascripts/dialogs/import.jsindex 0f08a07039..0e419a86fd 100644--- a/src/public/javascripts/dialogs/import.js+++ b/src/public/javascripts/dialogs/import.js@@ -73,6 +73,10 @@ async function importIntoNote(importNoteId) {}async function uploadFiles(importNoteId, files, options) {+ if (files.length === 0) {+ return;+ }+let noteId;for (const file of files) {diff --git a/src/public/javascripts/services/tab_row.js b/src/public/javascripts/services/tab_row.jsindex 660f8f6af2..915e84643a 100644--- a/src/public/javascripts/services/tab_row.js+++ b/src/public/javascripts/services/tab_row.js@@ -34,7 +34,6 @@ class TabRow {constructor(el) {this.draggabillies = [];this.eventListeners = {};- this.tabIdCounter = 1;this.el = el;this.hideTabRowForOneTab = false;@@ -365,7 +364,9 @@ class TabRow {if (destinationIndex < originIndex) {tabEl.parentNode.insertBefore(tabEl, this.tabEls[destinationIndex]);} else {- tabEl.parentNode.insertBefore(tabEl, this.tabEls[destinationIndex + 1]);+ const beforeEl = this.tabEls[destinationIndex + 1] || this.newTabEl;++ tabEl.parentNode.insertBefore(tabEl, beforeEl);}await this.emit('tabReorder', { tabEl, originIndex, destinationIndex });this.layoutTabs();