Fixing cancel button not actually closing the popup window

Please read noted at modxcms/revolution#12238