The custom dialog does hide itself automatically before calling the callback. I think you only need to call hide() if you want to tear it down completely and delete the DOM elements it is using.  (hide is a terrible name for that).  It will then be slightly less efficient to display it the next time since it will have to be built again.  In the case of this app, I'd tend toward keeping it built for the case where the user wants to delete  a bunch of ringtones in a row.