Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Keep table selection highlighted while dragging https://github.com/siyuan-note/siyuan/issues/18489

Daniel3659a6d52d41
diff --git a/app/src/assets/scss/protyle/_protyle.scss b/app/src/assets/scss/protyle/_protyle.scss
index 5f98823407..4620d45530 100644
--- a/app/src/assets/scss/protyle/_protyle.scss
+++ b/app/src/assets/scss/protyle/_protyle.scss
@@ -855,10 +855,6 @@ table + .protyle-action__table {
background-color: var(--b3-theme-primary-lightest);
border: 1px solid var(--b3-theme-primary);
pointer-events: none;
-
- &--dragging {
- opacity: 0;
- }
}
&__drop {
diff --git a/app/src/protyle/util/tableControl.ts b/app/src/protyle/util/tableControl.ts
index cec8595517..081fa8c335 100644
--- a/app/src/protyle/util/tableControl.ts
+++ b/app/src/protyle/util/tableControl.ts
@@ -861,8 +861,6 @@ export class TableControl {
selectionElement.style.top = `${visibleRect.top}px`;
selectionElement.style.width = `${visibleRect.width}px`;
selectionElement.style.height = `${visibleRect.height}px`;
- selectionElement.classList.toggle("protyle-table-control__selection--dragging",
- !!this.dragState?.dragging);
}
private render() {
@@ -1724,9 +1722,6 @@ export class TableControl {
const handle = state.mode === "row" ? this.rowHandle : this.columnHandle;
handle.style.translate = translate;
this.cellHandle.classList.add("fn__none");
- this.selectionElements.slice(0, this.selectionElementIndex).forEach(item => {
- item.classList.add("protyle-table-control__selection--dragging");
- });
return {
position: state.handleCenter + offset,
viewportRect,
@@ -1736,9 +1731,6 @@ export class TableControl {
private clearDragPreview() {
this.rowHandle.style.removeProperty("translate");
this.columnHandle.style.removeProperty("translate");
- this.selectionElements.forEach(item => {
- item.classList.remove("protyle-table-control__selection--dragging");
- });
}
private getMoveTarget(target: number) {