File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ function buildStyle (
53
53
codeBlockFontFamily ,
54
54
lineNumber ,
55
55
scrollPastEnd ,
56
+ optimizeOverflowScroll ,
56
57
theme ,
57
58
allowCustomCSS ,
58
59
customCSS
@@ -86,12 +87,14 @@ function buildStyle (
86
87
url('${ appPath } /resources/fonts/MaterialIcons-Regular.woff') format('woff'),
87
88
url('${ appPath } /resources/fonts/MaterialIcons-Regular.ttf') format('truetype');
88
89
}
90
+
89
91
${ markdownStyle }
90
92
91
93
body {
92
94
font-family: '${ fontFamily . join ( "','" ) } ';
93
95
font-size: ${ fontSize } px;
94
- ${ scrollPastEnd && 'padding-bottom: 90vh;' }
96
+ ${ scrollPastEnd ? 'padding-bottom: 90vh;' : '' }
97
+ ${ optimizeOverflowScroll ? 'height: 100%;' : '' }
95
98
}
96
99
@media print {
97
100
body {
@@ -341,6 +344,7 @@ export default class MarkdownPreview extends React.Component {
341
344
codeBlockFontFamily ,
342
345
lineNumber ,
343
346
scrollPastEnd ,
347
+ false ,
344
348
theme ,
345
349
allowCustomCSS ,
346
350
customCSS
@@ -663,16 +667,19 @@ export default class MarkdownPreview extends React.Component {
663
667
this . getWindow ( ) . document . getElementById (
664
668
'codeTheme'
665
669
) . href = this . GetCodeThemeLink ( codeBlockTheme )
670
+
666
671
this . getWindow ( ) . document . getElementById ( 'style' ) . innerHTML = buildStyle (
667
672
fontFamily ,
668
673
fontSize ,
669
674
codeBlockFontFamily ,
670
675
lineNumber ,
671
676
scrollPastEnd ,
677
+ true ,
672
678
theme ,
673
679
allowCustomCSS ,
674
- customCSS
680
+ customCSS ,
675
681
)
682
+ this . getWindow ( ) . document . documentElement . style . overflowY = 'hidden'
676
683
}
677
684
678
685
GetCodeThemeLink ( name ) {
You can’t perform that action at this time.
0 commit comments