Skip to content

Commit

Permalink
fix: scrollbar should not hide when dragging
Browse files Browse the repository at this point in the history
  • Loading branch information
zzxming committed Dec 21, 2024
1 parent d23127b commit 79817b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/table-scrollbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class Scrollbar {
document.removeEventListener('mousemove', mouseMoveDocumentHandler);
document.removeEventListener('mouseup', mouseUpDocumentHandler);
if (this.cursorLeave) {
this.scrollbar.style.display = 'none';
this.hideScrollbar();
}
};
const startDrag = (e: MouseEvent) => {
Expand Down Expand Up @@ -193,6 +193,7 @@ export class Scrollbar {

hideScrollbar = debounce(() => {
this.cursorLeave = true;
if (this.cursorDown) return;
this.scrollbar.removeEventListener('transitionend', this.hideScrollbarTransitionend);
this.scrollbar.addEventListener('transitionend', this.hideScrollbarTransitionend, { once: true });
this.scrollbar.classList.add(this.bem.is('transparent'));
Expand Down

0 comments on commit 79817b6

Please sign in to comment.