Commit f26877ee authored by Dan Beam's avatar Dan Beam Committed by Commit Bot

Downloads: touch up focus equivalents when buttons disappear

This happens when you cancel or retry downloads.

R=aee@chromium.org
BUG=922014

Change-Id: I7639a255911bb88c6c472a19157ce1fe4ceef5ec
Reviewed-on: https://chromium-review.googlesource.com/c/1437545Reviewed-by: default avatarEsmael El-Moslimany <aee@chromium.org>
Commit-Queue: Dan Beam (slow until 1/29) <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626767}
parent 09759252
......@@ -10,6 +10,9 @@ cr.define('downloads', function() {
cr.ui.FocusRowBehavior,
],
/** Used by FocusRowBehavior. */
overrideCustomEquivalent: true,
properties: {
/** @type {!downloads.Data} */
data: Object,
......@@ -104,6 +107,17 @@ cr.define('downloads', function() {
this.content = this.$.content;
},
/** Overrides FocusRowBehavior. */
getCustomEquivalent: function(sampleElement) {
if (sampleElement.getAttribute('focus-type') == 'cancel') {
return this.$$('[focus-type="retry"]');
}
if (sampleElement.getAttribute('focus-type') == 'retry') {
return this.$$('[focus-type="pauseOrResume"]');
}
return null;
},
/** @return {!HTMLElement} */
getFileIcon: function() {
return assert(this.$['file-icon']);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment