mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
fix(views/board): column not clickable after dragging
This commit is contained in:
parent
fe8a8eeac9
commit
d9820d9725
@ -288,8 +288,8 @@ export class DifferentialBoardRenderer {
|
|||||||
// Ensure card is in correct position
|
// Ensure card is in correct position
|
||||||
this.ensureCardPosition($existingCard, i, $cardContainer);
|
this.ensureCardPosition($existingCard, i, $cardContainer);
|
||||||
} else {
|
} else {
|
||||||
// Create new card (pass isNewCard flag)
|
// Create new card
|
||||||
const $newCard = this.createCard(item.note, item.branch, column, isNewCard);
|
const $newCard = this.createCard(item.note, item.branch, column);
|
||||||
$newCard.addClass('fade-in').css('opacity', '0');
|
$newCard.addClass('fade-in').css('opacity', '0');
|
||||||
|
|
||||||
// Insert at correct position
|
// Insert at correct position
|
||||||
@ -364,7 +364,7 @@ export class DifferentialBoardRenderer {
|
|||||||
// Add cards
|
// Add cards
|
||||||
for (const item of columnItems) {
|
for (const item of columnItems) {
|
||||||
if (item.note) {
|
if (item.note) {
|
||||||
const $noteEl = this.createCard(item.note, item.branch, column, false); // false = existing card
|
const $noteEl = this.createCard(item.note, item.branch, column);
|
||||||
$columnEl.append($noteEl);
|
$columnEl.append($noteEl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -381,7 +381,7 @@ export class DifferentialBoardRenderer {
|
|||||||
return $columnEl;
|
return $columnEl;
|
||||||
}
|
}
|
||||||
|
|
||||||
private createCard(note: any, branch: any, column: string, isNewCard = false): JQuery<HTMLElement> {
|
private createCard(note: any, branch: any, column: string): JQuery<HTMLElement> {
|
||||||
const $iconEl = $("<span>")
|
const $iconEl = $("<span>")
|
||||||
.addClass("icon")
|
.addClass("icon")
|
||||||
.addClass(note.getIcon());
|
.addClass(note.getIcon());
|
||||||
@ -403,11 +403,7 @@ export class DifferentialBoardRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$noteEl.prepend($iconEl);
|
$noteEl.prepend($iconEl);
|
||||||
|
|
||||||
// Only add quick edit click handler for existing cards (not new ones)
|
|
||||||
if (!isNewCard) {
|
|
||||||
$noteEl.on("click", () => appContext.triggerCommand("openInPopup", { noteIdOrPath: note.noteId }));
|
$noteEl.on("click", () => appContext.triggerCommand("openInPopup", { noteIdOrPath: note.noteId }));
|
||||||
}
|
|
||||||
|
|
||||||
// Setup drag functionality
|
// Setup drag functionality
|
||||||
this.dragHandler.setupNoteDrag($noteEl, note, branch);
|
this.dragHandler.setupNoteDrag($noteEl, note, branch);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user