Add onBeforeClose() function call to close()
Update to use BaseView's onBeforeClose()