Fixed unnecessary extra tab from opening on Firefox
Removed reference to target_view = view.open() to prevent the new tab from opening. Instead catching this case within the fs_error function with an else statement, so if no target_view: window.open() and pass the target of "_blank" to allow dataURL to open in new tab rather than steal the current window.
This commit is contained in:
+3
-3
@@ -94,7 +94,9 @@ var saveAs = saveAs
|
||||
}
|
||||
if (target_view) {
|
||||
target_view.location.href = object_url;
|
||||
}
|
||||
} else {
|
||||
window.open(object_url, "_blank");
|
||||
}
|
||||
filesaver.readyState = filesaver.DONE;
|
||||
dispatch_all();
|
||||
}
|
||||
@@ -137,8 +139,6 @@ var saveAs = saveAs
|
||||
}
|
||||
if (type === force_saveable_type || webkit_req_fs) {
|
||||
target_view = view;
|
||||
} else {
|
||||
target_view = view.open();
|
||||
}
|
||||
if (!req_fs) {
|
||||
fs_error();
|
||||
|
||||
Reference in New Issue
Block a user