Uncaught TypeError: Cannot read property 'dispatchEvent' of null
It looks like all windows need to be initialized first (e.g. using the show() function) otherwise the exception above appears in the console.
Please see the example below
If you then call show() also on the second window, reload the app, and hit Esc on the first window there will be no error. Possibly a bug?