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
commitff8782cc9079cb56524d281bff07331d14f80462 (patch)
treea4352b7bb0c3c06d064003c90367948ba56c6abe
parent0fe34194d091464f5b1f88a2a51c72875bb092d3 (diff)
downloadtimeline-ff8782cc9079cb56524d281bff07331d14f80462.tar.gz
timeline-ff8782cc9079cb56524d281bff07331d14f80462.tar.bz2
timeline-ff8782cc9079cb56524d281bff07331d14f80462.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);