Further support for modal dialogs (#27).