aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-10 14:31:26 +0800
committercrupest <crupest@outlook.com>2020-06-10 14:31:26 +0800
commit788ffcb06fcf021312f70c3e296011bb06fe1e84 (patch)
treeebd60ed8efb6e957ac2d6de0525b9e171c4f4bec
parent129eb19c02c1486db22efb3bf74344cd57129753 (diff)
downloadtimeline-788ffcb06fcf021312f70c3e296011bb06fe1e84.tar.gz
timeline-788ffcb06fcf021312f70c3e296011bb06fe1e84.tar.bz2
timeline-788ffcb06fcf021312f70c3e296011bb06fe1e84.zip
fix(front): Add an additional condition for disable scroll to bottom.
-rw-r--r--Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx b/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
index 1cd772c2..a4bad6aa 100644
--- a/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
+++ b/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
@@ -82,6 +82,7 @@ export default function TimelinePageTemplateUI<
const subscriptions = [
fromEvent(window, 'wheel').subscribe(disableScrollToBottom),
fromEvent(window, 'pointerdown').subscribe(disableScrollToBottom),
+ fromEvent(window, 'keydown').subscribe(disableScrollToBottom),
resizeSubject.subscribe(() => {
if (scrollToBottom) {
window.scrollTo(0, document.body.scrollHeight);