I have following code for downloading PDF files from backend:
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.setAttribute('target', '_blank')
link.setAttribute('download', file_name)
link.click()
link.remove()
setTimeout(() => window.URL.revokeObjectURL(url), 100)
It works in Chrome as expected, and I believe it worked in Firefox before, but now Firefox opens file in the same tab instead of downloading, ignoring target and download attributes.