Tab and modality fixes for the modal dialogs
Merge with master
Fixes after first review
Merge pull request #4714 from TomMalbran/tom/dialogs-fixes

Tab and modality fixes for the modal dialogs