diff --git a/docs/en_US/release_notes_4_4.rst b/docs/en_US/release_notes_4_4.rst index c8d0282ec..4db3b1a59 100644 --- a/docs/en_US/release_notes_4_4.rst +++ b/docs/en_US/release_notes_4_4.rst @@ -18,4 +18,5 @@ Bug fixes | `Bug #3995 `_ - Avoid 'bogus varno' message from Postgres when viewing the SQL for a table with triggers. | `Bug #4054 `_ - Handle resultsets with zero columns correctly in the Query Tool. -| `Bug #4060 `_ - Fix the latexpdf doc build. \ No newline at end of file +| `Bug #4060 `_ - Fix the latexpdf doc build. +| `Bug #4071 `_ - Ensure that Firefox prompts for a filename/location when downloading query results as a CSV file. \ No newline at end of file diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index 7b4da193f..8aad0e7f2 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -3612,8 +3612,10 @@ define('tools.querytool', [ .done(function(response) { let urlCreator = window.URL || window.webkitURL, url = urlCreator.createObjectURL(response), - link = document.createElement('a'), - current_browser = pgAdmin.Browser.get_browser(); + current_browser = pgAdmin.Browser.get_browser(), + link = document.createElement('a'); + + document.body.appendChild(link); if (current_browser.name === 'IE' && window.navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL) @@ -3624,6 +3626,7 @@ define('tools.querytool', [ link.click(); } + document.body.removeChild(link); self.download_csv_obj = undefined; // Enable the execute button $('#btn-flash').prop('disabled', false);