mirror of
https://github.com/zadam/trilium.git
synced 2025-12-09 12:16:10 +08:00
fix tab dragging issue
This commit is contained in:
parent
dedc1e708f
commit
027b3eaed8
2 changed files with 7 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue