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) {
|
async function uploadFiles(importNoteId, files, options) {
|
||||||
|
if (files.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let noteId;
|
let noteId;
|
||||||
|
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
|
@ -34,7 +34,6 @@ class TabRow {
|
|||||||
constructor(el) {
|
constructor(el) {
|
||||||
this.draggabillies = [];
|
this.draggabillies = [];
|
||||||
this.eventListeners = {};
|
this.eventListeners = {};
|
||||||
this.tabIdCounter = 1;
|
|
||||||
|
|
||||||
this.el = el;
|
this.el = el;
|
||||||
this.hideTabRowForOneTab = false;
|
this.hideTabRowForOneTab = false;
|
||||||
@ -365,7 +364,9 @@ class TabRow {
|
|||||||
if (destinationIndex < originIndex) {
|
if (destinationIndex < originIndex) {
|
||||||
tabEl.parentNode.insertBefore(tabEl, this.tabEls[destinationIndex]);
|
tabEl.parentNode.insertBefore(tabEl, this.tabEls[destinationIndex]);
|
||||||
} else {
|
} 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 });
|
await this.emit('tabReorder', { tabEl, originIndex, destinationIndex });
|
||||||
this.layoutTabs();
|
this.layoutTabs();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user