Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: Source/devtools/front_end/sources/FilteredItemSelectionDialog.js

Issue 366913005: [DevTools] Don't select anything when no items in FilteredItemSelectionDialog. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sources/FilteredItemSelectionDialog.js
diff --git a/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js b/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js
index e0558bbaf64925890dd4472c6149223c1cd6122f..495f4de4199bbab083aae462b1926ee37d509f4f 100644
--- a/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js
+++ b/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js
@@ -325,6 +325,8 @@ WebInspector.FilteredItemSelectionDialog.prototype = {
*/
_updateSelection: function(index, makeLast)
{
+ if (!this._filteredItems.length)
+ return;
var element = this._viewportControl.renderedElementAt(this._selectedIndexInFiltered);
if (element)
element.classList.remove("selected");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698