> is it necessary to always reset the focus back to some element after the dialog is closed?

Nope. I was just curious! 

If you could just squash your commits, I'll merge. Thanks