mirror of
https://github.com/zadam/trilium.git
synced 2025-10-11 16:06:24 +08:00
fix(views/board): unable to scroll vertically
This commit is contained in:
parent
ca1403ffea
commit
adf14bec31
1 changed files with 7 additions and 5 deletions
|
@ -24,6 +24,7 @@ const TPL = /*html*/`
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
padding-bottom: 0;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@ const TPL = /*html*/`
|
||||||
background-color: var(--accented-background-color);
|
background-color: var(--accented-background-color);
|
||||||
transition: border-color 0.2s ease;
|
transition: border-color 0.2s ease;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.board-view-container .board-column.drag-over {
|
.board-view-container .board-column.drag-over {
|
||||||
|
@ -355,7 +357,7 @@ export default class BoardView extends ViewMode<BoardData> {
|
||||||
if (!this.api) {
|
if (!this.api) {
|
||||||
throw new Error("API not initialized");
|
throw new Error("API not initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.api.refresh(this.parentNote);
|
await this.api.refresh(this.parentNote);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,12 +365,12 @@ export default class BoardView extends ViewMode<BoardData> {
|
||||||
// Handle column title editing with click detection that works with dragging
|
// Handle column title editing with click detection that works with dragging
|
||||||
this.$container.on('mousedown', 'h3[data-column-value]', (e) => {
|
this.$container.on('mousedown', 'h3[data-column-value]', (e) => {
|
||||||
const $titleEl = $(e.currentTarget);
|
const $titleEl = $(e.currentTarget);
|
||||||
|
|
||||||
// Don't interfere with editing mode
|
// Don't interfere with editing mode
|
||||||
if ($titleEl.hasClass('editing') || $(e.target).is('input')) {
|
if ($titleEl.hasClass('editing') || $(e.target).is('input')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
let hasMoved = false;
|
let hasMoved = false;
|
||||||
const startX = e.clientX;
|
const startX = e.clientX;
|
||||||
|
@ -425,7 +427,7 @@ export default class BoardView extends ViewMode<BoardData> {
|
||||||
const $titleSpan = $titleEl.find("span").first(); // Get the text span
|
const $titleSpan = $titleEl.find("span").first(); // Get the text span
|
||||||
const currentTitle = $titleSpan.text();
|
const currentTitle = $titleSpan.text();
|
||||||
$titleEl.addClass("editing");
|
$titleEl.addClass("editing");
|
||||||
|
|
||||||
// Disable dragging while editing
|
// Disable dragging while editing
|
||||||
$titleEl.attr("draggable", "false");
|
$titleEl.attr("draggable", "false");
|
||||||
|
|
||||||
|
@ -448,7 +450,7 @@ export default class BoardView extends ViewMode<BoardData> {
|
||||||
}
|
}
|
||||||
|
|
||||||
$titleEl.removeClass("editing");
|
$titleEl.removeClass("editing");
|
||||||
|
|
||||||
// Re-enable dragging after editing
|
// Re-enable dragging after editing
|
||||||
$titleEl.attr("draggable", "true");
|
$titleEl.attr("draggable", "true");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue