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

Unified Diff: chrome/browser/resources/tracing/overlay.js

Issue 10170001: Find feature for tracing, at long last. (Closed) Base URL: git://localhost/home/nduca/Local/chrome/src@master
Patch Set: patch for landing Created 8 years, 8 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
Index: chrome/browser/resources/tracing/overlay.js
diff --git a/chrome/browser/resources/tracing/overlay.js b/chrome/browser/resources/tracing/overlay.js
index bcf377111e951e0a68f4d30815fd2009f44dd804..1a911a83911cbeb931fd43bd0756553c6acbc7da 100644
--- a/chrome/browser/resources/tracing/overlay.js
+++ b/chrome/browser/resources/tracing/overlay.js
@@ -56,7 +56,12 @@ cr.define('tracing', function() {
// Bring overlay into focus.
overlay.tabIndex = 0;
- overlay.focus();
+ var focusElement =
+ overlay.querySelector('button, input, list, select, a');
+ if (!focusElement) {
+ focusElement = overlay;
+ }
+ focusElement.focus();
// Listen to key and focus events to prevent focus from
// leaving the overlay.
« no previous file with comments | « chrome/browser/resources/tracing/linux_perf_importer_test.html ('k') | chrome/browser/resources/tracing/overlay_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698