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

Unified Diff: chrome/browser/resources/downloads/manager.js

Issue 1018543005: downloads: fix Resume/Pause focus regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests Created 5 years, 9 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/downloads/manager.js
diff --git a/chrome/browser/resources/downloads/manager.js b/chrome/browser/resources/downloads/manager.js
index 36b2fa0a3ebef299b60d85110ddf07c0b2719a98..b0ce89ecda4cc23de33c4f314c3eca2456d60222 100644
--- a/chrome/browser/resources/downloads/manager.js
+++ b/chrome/browser/resources/downloads/manager.js
@@ -108,8 +108,10 @@ cr.define('downloads', function() {
item.render(data);
var focusRow = this.decorateItem_(item);
- if (activeElement != document.activeElement)
+ if (focusRow.contains(activeElement) &&
+ !downloads.FocusRow.shouldFocus(activeElement)) {
focusRow.getEquivalentElement(activeElement).focus();
+ }
},
/**
@@ -127,8 +129,8 @@ cr.define('downloads', function() {
var focusRow = this.decorateItem_(item);
this.focusGrid_.addRow(focusRow);
- if (activeElement != document.activeElement &&
- focusRow.contains(activeElement)) {
+ if (focusRow.contains(activeElement) &&
+ !downloads.FocusRow.shouldFocus(activeElement)) {
focusRow.getEquivalentElement(activeElement).focus();
}
}, this);
« no previous file with comments | « chrome/browser/resources/downloads/focus_row.js ('k') | chrome/browser/ui/webui/downloads_ui_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698