mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix tab dragging issue
This commit is contained in:
parent
dedc1e708f
commit
027b3eaed8
@ -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) {
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user