focusHandler = function(event) {
        if (event.target && event.target.nextSibling &&
            event.target.nextSibling.nodeName === 'MD-DIALOG') {
          var lastFocusableElement = $mdUtil.getLastTabbableElement(element[0]);
          if (angular.isElement(lastFocusableElement)) {
            lastFocusableElement.focus();
          }
        } else {
          element.focus();
        }
      }
When focus is about to move out of the end of the dialog, we intercept it and redirect it
back to the md-dialog element.
When focus is about to move out of the start of the dialog, we intercept it and redirect it
back to the last focusable element in the md-dialog.
@param {FocusEvent} event