function focusOnOpen() {
        if (options.focusOnOpen) {
          var target = $mdUtil.findFocusTarget(element) || findCloseButton() || dialogElement;
          target.focus();
        }

        /**
         * If no element with class dialog-close, try to find the last
         * button child in md-actions and assume it is a close button.
         *
         * If we find no actions at all, log a warning to the console.
         */
        function findCloseButton() {
          return element[0].querySelector('.dialog-close, md-dialog-actions button:last-child');
        }
      }
function focusOnOpen() {
        if (options.focusOnOpen) {
          var target = $mdUtil.findFocusTarget(element) || findCloseButton() || dialogElement;
          target.focus();
        }

        /**
         * If no element with class dialog-close, try to find the last
         * button child in md-actions and assume it is a close button.
         *
         * If we find no actions at all, log a warning to the console.
         */
        function findCloseButton() {
          return element[0].querySelector('.dialog-close, md-dialog-actions button:last-child');
        }
      }
function focusOnOpen ( ) { if ( options . focusOnOpen ) { var target = $mdUtil . findFocusTarget ( element ) || findCloseButton ( ) || dialogElement ; target . focus ( ) ; } /**
         * If no element with class dialog-close, try to find the last
         * button child in md-actions and assume it is a close button.
         *
         * If we find no actions at all, log a warning to the console.
         */ function findCloseButton ( ) { return element [ 0 ] . querySelector ( '.dialog-close, md-dialog-actions button:last-child' ) ; } }
For alerts, focus on content... otherwise focus on
the close button (or equivalent)
For alerts focus on content ... otherwise focus on the close button ( or equivalent )
Focus on open