Remove a placeholder if any dialog is closed.

This meant hooking to the cancel buttons and the escape keyboard key.
Use $.on('click', instead of $.click. Deprecation and all that.