I'm using Electron with react-js. whenever I call window.print() it shows the popup but if I tries to close it, it causes a crash and the whole window closed automatically.
btn.onClick = (e) => {
e.preventDefault
window.print()
}
/* dependencies */
'version' : '17.0.1' ,
"react": "^17.0.2" ,
"electron-squirrel-startup": "^1.0.0"
So, my question is how to fix it in the Electron app, and can I use silent print in react-js if yes how I can use it?
Recently I ended up with a solution. I visit the Electron site they just released a new stable version of electron 17.1.1 and they also have been fixed this issue. it's working fine in my device window 10
Type
npm i electon@latestit'll install a newer version of Electron.