Bladeren bron

fix exception when stepping backwards through code highlights #3524

Hakim El Hattab 1 jaar geleden
bovenliggende
commit
bbd0d3e4f7
3 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 0 0
      plugin/highlight/highlight.esm.js
  2. 0 0
      plugin/highlight/highlight.js
  3. 1 1
      plugin/highlight/plugin.js

File diff suppressed because it is too large
+ 0 - 0
plugin/highlight/highlight.esm.js


File diff suppressed because it is too large
+ 0 - 0
plugin/highlight/highlight.js


+ 1 - 1
plugin/highlight/plugin.js

@@ -138,7 +138,7 @@ const Plugin = {
 
 
 					// Scroll highlights into view as we step through them
 					// Scroll highlights into view as we step through them
 					fragmentBlock.addEventListener( 'visible', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock, scrollState ) );
 					fragmentBlock.addEventListener( 'visible', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock, scrollState ) );
-					fragmentBlock.addEventListener( 'hidden', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock.previousSibling, scrollState ) );
+					fragmentBlock.addEventListener( 'hidden', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock.previousElementSibling, scrollState ) );
 
 
 				} );
 				} );
 
 

Some files were not shown because too many files changed in this diff