Fixed unable to bind resize event & close dialog.