Destroy modal panel in blur handlers

Fixes #275.
I'm going to merge so I can start closing issues. I can revise later.