User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20180103231032 Steps to reproduce: I am developing a web-based app that allows the user to press Ctrl-S to save the document. We use event.preventDefault() on the key down event which usually prevents the browser's "Save As" dialog from appearing. Sometimes, though, the user needs to be authenticated and we subsequently use window.open to open the appropriate window for them to renew their security token. Actual results: After the second window opens, the "Save As" dialog appears, despite the fact we've already called event.preventDefault(). (I saved it out of curiosity and it was a file called index.html that contained just a content-type meta tag in the head and an empty body.) I confirmed this behaviour did not happen in Chrome 64.0.3282.119, IE 11.850.15063.0 or Edge 40.15063.674.0. Expected results: The "Save As" dialog should not appear, because event.preventDefault() had been called on the keyboard event.
As I think more about this now, I think the problem is not so much with preventDefault. In the other browsers I tested, the "Save As" dialog never appeared, even when I commented out the code that called preventDefault. I think the broader issue is with events from one window being passed on to the second one when window.open is used. In this scenario at least, I don't think the second window should receive the events.
You need to log in before you can comment on or make changes to this bug.