Index: Source/devtools/front_end/ui/ViewportControl.js |
diff --git a/Source/devtools/front_end/ui/ViewportControl.js b/Source/devtools/front_end/ui/ViewportControl.js |
index e783548ae26e2f6e40d6ac7d0d4f2af481b134b5..42096a7aea4e3bb6d2611368a18b4a7bf86c801b 100644 |
--- a/Source/devtools/front_end/ui/ViewportControl.js |
+++ b/Source/devtools/front_end/ui/ViewportControl.js |
@@ -378,7 +378,7 @@ WebInspector.ViewportControl.prototype = { |
return; |
} |
- var selection = window.getSelection(); |
+ var selection = this.element.window().getSelection(); |
var shouldRestoreSelection = this._updateSelectionModel(selection); |
var visibleFrom = this.element.scrollTop; |
@@ -480,7 +480,7 @@ WebInspector.ViewportControl.prototype = { |
*/ |
_selectedText: function() |
{ |
- this._updateSelectionModel(window.getSelection()); |
+ this._updateSelectionModel(this.element.window().getSelection()); |
if (!this._headSelection || !this._anchorSelection) |
return null; |