File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -129,8 +129,10 @@ var urlHandler = {
129129 var fileName = urlHandler . getFileName ( pattern ) ;
130130 var expectedPath = window . location . protocol + "//" + window . location . host + window . location . pathname . replace ( "public/index.html" , "public/" ) + fileName ;
131131 if ( givenPath != expectedPath ) {
132+ // make sure to update the iframe because there was a click
132133 document . getElementById ( "sg-viewport" ) . contentWindow . postMessage ( { "path" : fileName } , urlHandler . targetOrigin ) ;
133134 } else {
135+ // add to the history
134136 var addressReplacement = ( window . location . protocol == "file:" ) ? null : window . location . protocol + "//" + window . location . host + window . location . pathname . replace ( "index.html" , "" ) + "?p=" + pattern ;
135137 history . pushState ( data , null , addressReplacement ) ;
136138 document . getElementById ( "title" ) . innerHTML = "Pattern Lab - " + pattern ;
You can’t perform that action at this time.
0 commit comments