Constrain dialogs to main viewport