[WIP] Fix focus issues for the MessageDialog

Fixes #772