[globals] self.UI.inspectorView

[email protected]

Bug: 1058320
Change-Id: If282650f584d4db45c0a6260e102f044791f759d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2379692
Reviewed-by: Simon Zünd <[email protected]>
Commit-Queue: Tim van der Lippe <[email protected]>
diff --git a/front_end/ui/SearchableView.js b/front_end/ui/SearchableView.js
index 8997348..a7142df 100644
--- a/front_end/ui/SearchableView.js
+++ b/front_end/ui/SearchableView.js
@@ -35,6 +35,7 @@
 import * as Common from '../common/common.js';
 
 import {HistoryInput} from './HistoryInput.js';
+import {InspectorView} from './InspectorView.js';
 import {Toolbar, ToolbarButton, ToolbarToggle} from './Toolbar.js';
 import {createTextButton} from './UIUtils.js';
 import {VBox} from './Widget.js';
@@ -347,7 +348,7 @@
 
     let queryCandidate;
     if (!this._searchInputElement.hasFocus()) {
-      const selection = self.UI.inspectorView.element.window().getSelection();
+      const selection = InspectorView.instance().element.window().getSelection();
       if (selection.rangeCount) {
         queryCandidate = selection.toString().replace(/\r?\n.*/, '');
       }