Video still plays after UI Dialog has been closed...

Video still plays after UI Dialog has been closed...

We are not using UI Dialog directly, but it's self-made extension. While some functions are overloaded, close method stays the same. Now if we place youtube video into the Dialog and then close it, it continues to play in IE. It stops in all other browsers.

Why does it happen so?