Skip to content

Commit 83e4c19

Browse files
authored
Fix scrolling issue in firefox (Close algorithm-visualizer#248) (algorithm-visualizer#251)
1 parent e47d303 commit 83e4c19

File tree

7 files changed

+29
-14
lines changed

7 files changed

+29
-14
lines changed

src/frontend/components/Navigator/stylesheet.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
flex: 1;
55
display: flex;
66
flex-direction: column;
7+
min-height: 0;
78

89
.search_bar_container {
910
height: $line-height;
@@ -37,4 +38,4 @@
3738
border-top: 1px solid $theme-light;
3839
overflow-y: auto;
3940
}
40-
}
41+
}

src/frontend/components/VisualizationViewer/stylesheet.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
display: flex;
66
flex-direction: column;
77
align-items: stretch;
8+
min-height: 0;
89
}

src/frontend/core/renderers/LogRenderer/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ class LogRenderer extends Renderer {
1919
const { log } = this.props.data;
2020

2121
return (
22-
<div className={styles.log} ref={this.elementRef} dangerouslySetInnerHTML={{ __html: log }} />
22+
<div className={styles.log} ref={this.elementRef}>
23+
<div className={styles.content} dangerouslySetInnerHTML={{ __html: log }} />
24+
</div>
2325
);
2426
}
2527
}

src/frontend/core/renderers/LogRenderer/stylesheet.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
.log {
44
flex: 1;
55
align-self: stretch;
6-
padding: 24px;
76
display: flex;
87
flex-direction: column;
8+
align-items: stretch;
99
overflow-y: auto;
10-
font-family: $font-family-monospace;
11-
white-space: pre-wrap;
12-
line-height: 1.6;
10+
11+
.content {
12+
padding: 24px;
13+
font-family: $font-family-monospace;
14+
white-space: pre-wrap;
15+
line-height: 1.6;
16+
}
1317
}

src/frontend/core/renderers/MarkdownRenderer/index.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ class MarkdownRenderer extends Renderer {
6262
};
6363

6464
return (
65-
<ReactMarkdown className={styles.markdown} source={markdown} renderers={{ heading, link, image }}
66-
escapeHtml={false} />
65+
<div className={styles.markdown}>
66+
<ReactMarkdown className={styles.content} source={markdown} renderers={{ heading, link, image }}
67+
escapeHtml={false} />
68+
</div>
6769
);
6870
}
6971
}
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
@import "~/common/stylesheet/index";
22

33
.markdown {
4-
display: flex;
5-
flex-direction: column;
64
flex: 1;
75
align-self: stretch;
8-
padding: 24px;
9-
font-size: $font-size-large;
6+
display: flex;
7+
flex-direction: column;
8+
align-items: stretch;
109
overflow-y: auto;
1110

12-
a {
13-
text-decoration: underline;
11+
.content {
12+
padding: 24px;
13+
font-size: $font-size-large;
14+
15+
a {
16+
text-decoration: underline;
17+
}
1418
}
1519
}

src/frontend/core/renderers/Renderer/stylesheet.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
display: flex;
88
align-items: center;
99
justify-content: center;
10+
min-height: 0;
1011

1112
&:first-child {
1213
border-top: none;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy