Commit 5eb8656 1 parent 2b0bd27 commit 5eb8656 Copy full SHA for 5eb8656
File tree 1 file changed +13
-0
lines changed
electron/renderer/components/game-content
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,18 @@ const emptyLogLine: GameLogLine = {
44
44
*/
45
45
const emptyLogLineRegex = / ^ ( > ? ) ( \n + ) $ / ;
46
46
47
+ /**
48
+ * For the 'scroll' event to fire on the element, the overflow
49
+ * property must be set. We rely on this to know if the user has
50
+ * scrolled to the bottom (and we should engage in auto-scrolling)
51
+ * or if they have scrolled away from the bottom (and we should
52
+ * not auto-scroll).
53
+ */
54
+ const scrollablePanelStyles = css ( {
55
+ overflowY : 'scroll' ,
56
+ height : '100%' ,
57
+ } ) ;
58
+
47
59
const filterDuplicateEmptyLines : rxjs . MonoTypeOperatorFunction < GameLogLine > = (
48
60
observable : rxjs . Observable < GameLogLine >
49
61
) => {
@@ -178,6 +190,7 @@ export const GameContent: React.FC<GameContentProps> = (
178
190
return (
179
191
< EuiPanel
180
192
panelRef = { scrollableRef }
193
+ css = { scrollablePanelStyles }
181
194
paddingSize = "none"
182
195
hasBorder = { false }
183
196
hasShadow = { false }
You can’t perform that action at this time.
0 commit comments