Browse Source

examples: fix dark theme on empty location hash (#21932)

Co-authored-by: Felix Mariotto <[email protected]>
Felix Mariotto 4 years ago
parent
commit
c326e6c1ed
2 changed files with 3 additions and 0 deletions
  1. 2 0
      examples/index.html
  2. 1 0
      files/main.css

+ 2 - 0
examples/index.html

@@ -118,6 +118,7 @@
 
 
 					selectFile( file );
 					selectFile( file );
 					viewer.src = validRedirects.get( file );
 					viewer.src = validRedirects.get( file );
+					viewer.style.display = 'unset';
 
 
 				}
 				}
 
 
@@ -234,6 +235,7 @@
 
 
 			window.location.hash = file;
 			window.location.hash = file;
 			viewer.focus();
 			viewer.focus();
+			viewer.style.display = 'unset';
 
 
 			panel.classList.remove( 'open' );
 			panel.classList.remove( 'open' );
 
 

+ 1 - 0
files/main.css

@@ -383,6 +383,7 @@ iframe {
 	width: 100%;
 	width: 100%;
 	height: 100%;
 	height: 100%;
 	overflow: auto;
 	overflow: auto;
+	display: none;
 }
 }
 
 
 #viewer {
 #viewer {