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

+2-1
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

+1
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

+3-1
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

+8-4
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

+4-2
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
}
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

+1
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)