Added support for different focus elements in the modal.