Browse Source

Merge pull request #16290 from Maxsior/patch-1

Editor: Fix workaround when exporting.
Mr.doob 6 years ago
parent
commit
e4a80292c7
1 changed files with 1 additions and 4 deletions
  1. 1 4
      editor/js/Menubar.File.js

+ 1 - 4
editor/js/Menubar.File.js

@@ -393,14 +393,11 @@ Menubar.File = function ( editor ) {
 	//
 
 	var link = document.createElement( 'a' );
-	link.style.display = 'none';
-	document.body.appendChild( link ); // Firefox workaround, see #6594
-
 	function save( blob, filename ) {
 
 		link.href = URL.createObjectURL( blob );
 		link.download = filename || 'data.json';
-		link.click();
+		link.dispatchEvent( new MouseEvent( 'click' ) );
 
 		// URL.revokeObjectURL( url ); breaks Firefox...