@@ -183,6 +183,10 @@ const scrollBarStyle = `
183
183
::-webkit-scrollbar-thumb {
184
184
background-color: rgba(0, 0, 0, 0.15);
185
185
}
186
+
187
+ ::-webkit-scrollbar-track-piece {
188
+ background-color: inherit;
189
+ }
186
190
`
187
191
const scrollBarDarkStyle = `
188
192
::-webkit-scrollbar {
@@ -192,6 +196,10 @@ const scrollBarDarkStyle = `
192
196
::-webkit-scrollbar-thumb {
193
197
background-color: rgba(0, 0, 0, 0.3);
194
198
}
199
+
200
+ ::-webkit-scrollbar-track-piece {
201
+ background-color: inherit;
202
+ }
195
203
`
196
204
197
205
const OSX = global . process . platform === 'darwin'
@@ -684,7 +692,6 @@ export default class MarkdownPreview extends React.Component {
684
692
allowCustomCSS,
685
693
customCSS
686
694
} )
687
- this . getWindow ( ) . document . documentElement . style . overflowY = 'hidden'
688
695
}
689
696
690
697
getCodeThemeLink ( name ) {
@@ -1066,7 +1073,7 @@ export default class MarkdownPreview extends React.Component {
1066
1073
if ( posOfHash > - 1 ) {
1067
1074
const extractedId = linkHash . slice ( posOfHash + 1 )
1068
1075
const targetId = mdurl . encode ( extractedId )
1069
- const targetElement = this . refs . root . contentWindow . document . getElementById (
1076
+ const targetElement = this . getWindow ( ) . document . getElementById (
1070
1077
targetId
1071
1078
)
1072
1079
0 commit comments