| Index: Source/devtools/front_end/elements/ElementsTreeOutline.js
|
| diff --git a/Source/devtools/front_end/elements/ElementsTreeOutline.js b/Source/devtools/front_end/elements/ElementsTreeOutline.js
|
| index 83e46ce14ae9662fded0d575644cb03bfffc0930..cb3bdeb40f267af9796dbb6690e7a3c0ba19d87f 100644
|
| --- a/Source/devtools/front_end/elements/ElementsTreeOutline.js
|
| +++ b/Source/devtools/front_end/elements/ElementsTreeOutline.js
|
| @@ -237,7 +237,7 @@ WebInspector.ElementsTreeOutline.prototype = {
|
| this._setClipboardData(null);
|
|
|
| // Don't prevent the normal copy if the user has a selection.
|
| - if (!window.getSelection().isCollapsed)
|
| + if (!event.target.window().getSelection().isCollapsed)
|
| return;
|
|
|
| // Do not interfere with text editing.
|
| @@ -632,7 +632,7 @@ WebInspector.ElementsTreeOutline.prototype = {
|
|
|
| _ondragstart: function(event)
|
| {
|
| - if (!window.getSelection().isCollapsed)
|
| + if (!event.target.window().getSelection().isCollapsed)
|
| return false;
|
| if (event.target.nodeName === "A")
|
| return false;
|
| @@ -1828,7 +1828,7 @@ WebInspector.ElementsTreeElement.prototype = {
|
|
|
| this._editing = WebInspector.InplaceEditor.startEditing(attribute, config);
|
|
|
| - window.getSelection().setBaseAndExtent(elementForSelection, 0, elementForSelection, 1);
|
| + this.listItemElement.window().getSelection().setBaseAndExtent(elementForSelection, 0, elementForSelection, 1);
|
|
|
| return true;
|
| },
|
| @@ -1852,7 +1852,7 @@ WebInspector.ElementsTreeElement.prototype = {
|
| container.textContent = textNode.nodeValue(); // Strip the CSS or JS highlighting if present.
|
| var config = new WebInspector.InplaceEditor.Config(this._textNodeEditingCommitted.bind(this, textNode), this._editingCancelled.bind(this));
|
| this._editing = WebInspector.InplaceEditor.startEditing(textNodeElement, config);
|
| - window.getSelection().setBaseAndExtent(textNodeElement, 0, textNodeElement, 1);
|
| + this.listItemElement.window().getSelection().setBaseAndExtent(textNodeElement, 0, textNodeElement, 1);
|
|
|
| return true;
|
| },
|
| @@ -1910,7 +1910,7 @@ WebInspector.ElementsTreeElement.prototype = {
|
|
|
| var config = new WebInspector.InplaceEditor.Config(editingComitted.bind(this), editingCancelled.bind(this), tagName);
|
| this._editing = WebInspector.InplaceEditor.startEditing(tagNameElement, config);
|
| - window.getSelection().setBaseAndExtent(tagNameElement, 0, tagNameElement, 1);
|
| + this.listItemElement.window().getSelection().setBaseAndExtent(tagNameElement, 0, tagNameElement, 1);
|
| return true;
|
| },
|
|
|
|
|