jQ UI dialog problem on MS EDGE

jQ UI dialog problem on MS EDGE

I have a problem with jQ UI on MS EDGE.
I was able to isolate the problem to my repo here : https://github.com/rostacik/jquiedgeproblem

I am using this - https://www.npmjs.com/package/http-server - nodejs based server to serve my files from the folder so git clone and running http-server will get you the same setup I use.

repro steps :
go to html/page.htm
click on button "call iframed window"
modal jQ UI dialog will appear
click to the right (on the body) of the button - you should hit the debugger statement in $("body").click(
continue with execution of JS
click on the "close me" button
in chrome and ff you will hit just the $("body").click( handler,
in EDGE you will also hit the window.addEventListener( handler

now the problem is, that this handler will be hit after the jQ UI dialog is closed and all objects like window , etc. are in a strange state.

I attached screenshot of what I see on my machine.

on my machine I can see these version number of EDGE :

Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134

thanks for any kind of idea :)