os:macOs 13.0.1(macbook pro 14 with Apple M1 Max) chrome version: 107.0.5304.110(release) (arm64)
I'm doing some development with the chrome extension and I need to export a file. this is my code for download:
function exportFile() {
chrome.storage.sync.get(['ruleProfiles'], async function (result) {
console.log('Value currently is ' + JSON.stringify(result));
if (JSON.stringify(result) === '{}') {
sourceJson = {};
} else {
sourceJson = result['ruleProfiles'];
}
console.log('ready to download');
// var url = 'data:application/json;base64,' + btoa(JSON.stringify(sourceJson));
var url = 'data:application/json;base64,' + btoa(JSON.stringify(sourceJson));
chrome.downloads.download({
url: url,
saveAs: false,
filename: 'vac-modify-header-profile.json',
conflictAction: "overwrite"
});
console.log('download success 1');
});
}
document.getElementById("exportBtn").addEventListener("click", exportFile);
When I press the exportBtn the save as dialog appeared. It was covered by the popup.html and I can't click it. After some test I found that it happenes if the chrome app is in full screen(the first pic). It will appear normally when chrome app is not in full screen(the second pic). What can I do to fix this? thanks for help.
I searched google and read the chrome doc. But found nothing.
I wish the save as dialog can appear normally