Hello,
My WebExtension has some of its UI in web pages that are displayed in a browser popup window (specificially, the window type passed to browser.windows.create() is “detached_panel”). I’ve set up an event listener for the “keypress” event and want to use CTRL+N in the WebExtension popup window. But pressing CTRL+N opens a new browser window with the same size as the WebExtension popup. I’ve noticed that the other standard Firefox browser keys are also functioning in my popup window (e.g. CTRL+S to save the page), which I don’t want. I tried using event.preventDefault() but it has no effect. I also tried changing the window type to “popup”, but again it doesn’t change anything. Any ideas? Thanks in advance.