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

Unified Diff: ui/file_manager/file_manager/foreground/js/file_manager_commands.js

Issue 1312583009: Files.app: Reset hidden state of default commands when input elements are focused. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use early return. Created 5 years, 3 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: ui/file_manager/file_manager/foreground/js/file_manager_commands.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
index 4b178fadeb2e78566f21f21c8b30065f53fa3e48..934eb6aded79109eb5c711a0ed4b4a6c5bab0542 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
@@ -219,8 +219,10 @@ CommandUtil.forceDefaultHandler = function(node, commandId) {
event.cancelBubble = true;
});
node.addEventListener('canExecute', function(event) {
- if (event.command.id === commandId)
- event.canExecute = document.queryCommandEnabled(event.command.id);
+ if (event.command.id !== commandId)
+ return;
+ event.canExecute = document.queryCommandEnabled(event.command.id);
+ event.command.setHidden(false);
});
};
« 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