Skip to content

Commit

Permalink
Fix scrolling issue in firefox (Close algorithm-visualizer#248) (algo…
Browse files Browse the repository at this point in the history
  • Loading branch information
64json authored Jun 7, 2019
1 parent e47d303 commit 83e4c19
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/frontend/components/Navigator/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;

.search_bar_container {
height: $line-height;
Expand Down Expand Up @@ -37,4 +38,4 @@
border-top: 1px solid $theme-light;
overflow-y: auto;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
display: flex;
flex-direction: column;
align-items: stretch;
min-height: 0;
}
4 changes: 3 additions & 1 deletion src/frontend/core/renderers/LogRenderer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class LogRenderer extends Renderer {
const { log } = this.props.data;

return (
<div className={styles.log} ref={this.elementRef} dangerouslySetInnerHTML={{ __html: log }} />
<div className={styles.log} ref={this.elementRef}>
<div className={styles.content} dangerouslySetInnerHTML={{ __html: log }} />
</div>
);
}
}
Expand Down
12 changes: 8 additions & 4 deletions src/frontend/core/renderers/LogRenderer/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
.log {
flex: 1;
align-self: stretch;
padding: 24px;
display: flex;
flex-direction: column;
align-items: stretch;
overflow-y: auto;
font-family: $font-family-monospace;
white-space: pre-wrap;
line-height: 1.6;

.content {
padding: 24px;
font-family: $font-family-monospace;
white-space: pre-wrap;
line-height: 1.6;
}
}
6 changes: 4 additions & 2 deletions src/frontend/core/renderers/MarkdownRenderer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ class MarkdownRenderer extends Renderer {
};

return (
<ReactMarkdown className={styles.markdown} source={markdown} renderers={{ heading, link, image }}
escapeHtml={false} />
<div className={styles.markdown}>
<ReactMarkdown className={styles.content} source={markdown} renderers={{ heading, link, image }}
escapeHtml={false} />
</div>
);
}
}
Expand Down
16 changes: 10 additions & 6 deletions src/frontend/core/renderers/MarkdownRenderer/stylesheet.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
@import "~/common/stylesheet/index";

.markdown {
display: flex;
flex-direction: column;
flex: 1;
align-self: stretch;
padding: 24px;
font-size: $font-size-large;
display: flex;
flex-direction: column;
align-items: stretch;
overflow-y: auto;

a {
text-decoration: underline;
.content {
padding: 24px;
font-size: $font-size-large;

a {
text-decoration: underline;
}
}
}
1 change: 1 addition & 0 deletions src/frontend/core/renderers/Renderer/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
display: flex;
align-items: center;
justify-content: center;
min-height: 0;

&:first-child {
border-top: none;
Expand Down

0 comments on commit 83e4c19

Please sign in to comment.