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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Issue 2865913003: DevTools: Set inactive class if devtools starts without focus (Closed)
Patch Set: Created 3 years, 7 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: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
index 26d1f9722401173afde4f39aa30ee34481e25230..66d61ac971923f8b646837771dbf9a96e81d5f93 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
@@ -1110,6 +1110,7 @@ UI.LongClickController = class extends Common.Object {
* @param {!Common.Setting} themeSetting
*/
UI.initializeUIUtils = function(document, themeSetting) {
+ document.body.classList.toggle('inactive', !document.hasFocus());
document.defaultView.addEventListener('focus', UI._windowFocused.bind(UI, document), false);
document.defaultView.addEventListener('blur', UI._windowBlurred.bind(UI, document), false);
document.addEventListener('focus', UI._focusChanged.bind(UI), true);
« 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