Skip to content

Commit d2f2cf3

Browse files
authored
Fix bottom fade effect calculation (#43)
1 parent aeb1a43 commit d2f2cf3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,13 @@
444444
}
445445

446446
updateFade() {
447-
console.log('updateFade called');
448447
const editor = this.editor;
449448
const top = this.fadeTop;
450449
const bottom = this.fadeBottom;
451450
const { scrollTop, scrollHeight, clientHeight } = editor;
452451

453452
top.style.opacity = scrollTop > 0 ? '1' : '0';
454-
bottom.style.opacity = scrollTop + clientHeight < scrollHeight ? '1' : '0';
453+
bottom.style.opacity = Math.ceil(scrollTop + clientHeight) < scrollHeight ? '1' : '0';
455454
}
456455

457456
// Actions

0 commit comments

Comments
 (0)