Przeglądaj źródła

Workaround bug in firefox. (#25918)

Without this change, each editor adds to the browser's history
and you have to click the back button once for each editor
Greggman 2 lat temu
rodzic
commit
880839159e
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      manual/examples/resources/editor.js

+ 3 - 1
manual/examples/resources/editor.js

@@ -1711,7 +1711,9 @@ async function openInStackBlitz() {
 
 
 		g.setPosition = false;
 		g.setPosition = false;
 		const url = getSourceBlobFromEditor();
 		const url = getSourceBlobFromEditor();
-		g.iframe.src = url;
+		// g.iframe.src = url;
+		// work around firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1828286
+		g.iframe.contentWindow.location.replace(url);
 
 
 	}
 	}