diff --git a/src/components/panel/panel.js b/src/components/panel/panel.js index 10bd6291b70..7ffce6a7dd5 100644 --- a/src/components/panel/panel.js +++ b/src/components/panel/panel.js @@ -933,8 +933,7 @@ angular var MD_PANEL_Z_INDEX = 80; var MD_PANEL_HIDDEN = '_md-panel-hidden'; -var FOCUS_TRAP_TEMPLATE = angular.element( - '
'); +var FOCUS_TRAP_TEMPLATE; var _presets = {}; @@ -2232,6 +2231,12 @@ MdPanelRef.prototype._configureTrapFocus = function() { var element = this.panelEl; // Set up elements before and after the panel to capture focus and // redirect back into the panel. + if (!FOCUS_TRAP_TEMPLATE) { + var template = document.createElement('div'); + template.className = '_md-panel-focus-trap'; + template.tabIndex = 0; + FOCUS_TRAP_TEMPLATE = angular.element(template); + } this._topFocusTrap = FOCUS_TRAP_TEMPLATE.clone()[0]; this._bottomFocusTrap = FOCUS_TRAP_TEMPLATE.clone()[0]; diff --git a/src/components/select/select.js b/src/components/select/select.js index 1675cd6c9bf..7536c99f49f 100755 --- a/src/components/select/select.js +++ b/src/components/select/select.js @@ -12,8 +12,7 @@ var SELECT_EDGE_MARGIN = 8; var selectNextId = 0; -var CHECKBOX_SELECTION_INDICATOR = - angular.element('