Vanessa 2025-07-18 09:31:39 +08:00
parent d5d6095070
commit 6e838bb91a
2 changed files with 18 additions and 0 deletions

View file

@ -428,6 +428,7 @@ export class Files extends Model {
hideTooltip();
const liElement = hasClosestByTag(event.target, "LI");
if (liElement) {
this.parent.panelElement.classList.add("sy__file--disablehover");
let selectElements: Element[] = Array.from(this.element.querySelectorAll(".b3-list-item--focus"));
if (!liElement.classList.contains("b3-list-item--focus")) {
selectElements.forEach((item) => {
@ -464,6 +465,7 @@ export class Files extends Model {
}
});
this.element.addEventListener("dragend", () => {
this.parent.panelElement.classList.remove("sy__file--disablehover");
this.element.querySelectorAll(".b3-list-item--focus").forEach((item: HTMLElement, index) => {
item.style.opacity = "";
// https://github.com/siyuan-note/siyuan/issues/11587