| Index: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
 | 
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
 | 
| index ee9cc15b912ed0aa0c95aab3de7d38c16412c7ae..5662a50e6e530103249252898d7a542848134030 100644
 | 
| --- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
 | 
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
 | 
| @@ -204,7 +204,8 @@ WebInspector.GlassPane = function(document, dimmed)
 | 
|  {
 | 
|      this.element = createElement("div");
 | 
|      var background = dimmed ? "rgba(255, 255, 255, 0.5)" : "transparent";
 | 
| -    this.element.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;background-color:" + background + ";z-index:3000;overflow:hidden;";
 | 
| +    this._zIndex = WebInspector._glassPane ? WebInspector._glassPane._zIndex + 1000 : 3000; // Deliberately starts with 3000 to hide other z-indexed elements below.
 | 
| +    this.element.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;background-color:" + background + ";z-index:" + this._zIndex + ";overflow:hidden;";
 | 
|      document.body.appendChild(this.element);
 | 
|      WebInspector._glassPane = this;
 | 
|  }
 | 
| @@ -219,6 +220,9 @@ WebInspector.GlassPane.prototype = {
 | 
|      }
 | 
|  }
 | 
|  
 | 
| +/** @type {!WebInspector.GlassPane|undefined} */
 | 
| +WebInspector._glassPane;
 | 
| +
 | 
|  /**
 | 
|   * @type {!Array.<!WebInspector.Widget|!WebInspector.Dialog>}
 | 
|   */
 | 
| @@ -771,17 +775,17 @@ WebInspector.setCurrentFocusElement = function(x)
 | 
|          WebInspector._previousFocusElement = WebInspector._currentFocusElement;
 | 
|      WebInspector._currentFocusElement = x;
 | 
|  
 | 
| -    if (WebInspector._currentFocusElement) {
 | 
| -        WebInspector._currentFocusElement.focus();
 | 
| +    if (x) {
 | 
| +        x.focus();
 | 
|  
 | 
|          // Make a caret selection inside the new element if there isn't a range selection and there isn't already a caret selection inside.
 | 
|          // This is needed (at least) to remove caret from console when focus is moved to some element in the panel.
 | 
|          // The code below should not be applied to text fields and text areas, hence _isTextEditingElement check.
 | 
|          var selection = x.getComponentSelection();
 | 
| -        if (!WebInspector._isTextEditingElement(WebInspector._currentFocusElement) && selection.isCollapsed && !WebInspector._currentFocusElement.isInsertionCaretInside()) {
 | 
| -            var selectionRange = WebInspector._currentFocusElement.ownerDocument.createRange();
 | 
| -            selectionRange.setStart(WebInspector._currentFocusElement, 0);
 | 
| -            selectionRange.setEnd(WebInspector._currentFocusElement, 0);
 | 
| +        if (!WebInspector._isTextEditingElement(x) && selection.isCollapsed && !x.isInsertionCaretInside()) {
 | 
| +            var selectionRange = x.ownerDocument.createRange();
 | 
| +            selectionRange.setStart(x, 0);
 | 
| +            selectionRange.setEnd(x, 0);
 | 
|  
 | 
|              selection.removeAllRanges();
 | 
|              selection.addRange(selectionRange);
 | 
| 
 |