fix tab dragging issue

This commit is contained in:
zadam 2019-05-22 21:59:14 +02:00
parent dedc1e708f
commit 027b3eaed8
2 changed files with 7 additions and 2 deletions

View File

@ -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) {

View File

@ -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();