I’m building an SPA that’s cross-platform across both desktops and mobile. In the Android version I am accounting for back button presses, and rather than going back a page in the browser history, I’m setting a sensible page to go back to. This is paired with on-screen backwards navigation. I’m currently working on the Electron version, and have noticed that while the Android version goes back a ‘page’ within the SPA, Electron full-on reloads
index.html, reloading from scratch.
Is there an Electron way of suppressing the backspace button so it doesn’t do a
history.back(), but still allows for text input? Or am I going to have to do some event jiggery-pokery in my app.
Extra points if I can also set the keypress to do something else, but still not break text input.