mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-30 12:33:52 -06:00
Fix download CSV for IE11 which doesn't support the download attribute. Fixes #4040
This commit is contained in:
parent
c6d295727c
commit
fb747b8031
@ -3597,11 +3597,17 @@ define('tools.querytool', [
|
||||
.done(function(response) {
|
||||
let urlCreator = window.URL || window.webkitURL,
|
||||
url = urlCreator.createObjectURL(response),
|
||||
link = document.createElement('a');
|
||||
link = document.createElement('a'),
|
||||
current_browser = pgAdmin.Browser.get_browser();
|
||||
|
||||
if (current_browser.name === 'IE' && window.navigator.msSaveBlob) {
|
||||
// IE10+ : (has Blob, but not a[download] or URL)
|
||||
window.navigator.msSaveBlob(response, filename);
|
||||
} else {
|
||||
link.setAttribute('href', url);
|
||||
link.setAttribute('download', filename);
|
||||
link.click();
|
||||
}
|
||||
|
||||
self.download_csv_obj = undefined;
|
||||
// Enable the execute button
|
||||
|
Loading…
Reference in New Issue
Block a user