mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +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
|
||||
this.ensureCardPosition($existingCard, i, $cardContainer);
|
||||
} else {
|
||||
// Create new card (pass isNewCard flag)
|
||||
const $newCard = this.createCard(item.note, item.branch, column, isNewCard);
|
||||
// Create new card
|
||||
const $newCard = this.createCard(item.note, item.branch, column);
|
||||
$newCard.addClass('fade-in').css('opacity', '0');
|
||||
|
||||
// Insert at correct position
|
||||
@ -364,7 +364,7 @@ export class DifferentialBoardRenderer {
|
||||
// Add cards
|
||||
for (const item of columnItems) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -381,7 +381,7 @@ export class DifferentialBoardRenderer {
|
||||
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>")
|
||||
.addClass("icon")
|
||||
.addClass(note.getIcon());
|
||||
@ -403,11 +403,7 @@ export class DifferentialBoardRenderer {
|
||||
}
|
||||
|
||||
$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
|
||||
this.dragHandler.setupNoteDrag($noteEl, note, branch);
|
||||
|
Loading…
x
Reference in New Issue
Block a user