[FIX] Modal dialog focus

Fixes [ticket 4023](https://www.openproject.org/work_packages/4023)