| Index: chrome/browser/resources/md_downloads/crisper.js
|
| diff --git a/chrome/browser/resources/md_downloads/crisper.js b/chrome/browser/resources/md_downloads/crisper.js
|
| index a5488681e091c7a8179665e8ef7c7facadc8104a..511053bb2cb5b1c277628bf93791729b4b7837e1 100644
|
| --- a/chrome/browser/resources/md_downloads/crisper.js
|
| +++ b/chrome/browser/resources/md_downloads/crisper.js
|
| @@ -11377,9 +11377,8 @@ cr.define('downloads', function() {
|
| },
|
|
|
| /** @private */
|
| - onClearAllTap_: function() {
|
| - assert(this.canClearAll());
|
| - downloads.ActionService.getInstance().clearAll();
|
| + closeMoreActions_: function(e) {
|
| + this.$.more.close();
|
| },
|
|
|
| /** @private */
|
| @@ -11388,16 +11387,35 @@ cr.define('downloads', function() {
|
| },
|
|
|
| /** @private */
|
| + onClearAllTap_: function() {
|
| + assert(this.canClearAll());
|
| + downloads.ActionService.getInstance().clearAll();
|
| + },
|
| +
|
| + /** @private */
|
| onPaperDropdownClose_: function() {
|
| - window.removeEventListener('resize', assert(this.boundResize_));
|
| + window.removeEventListener('resize', assert(this.boundClose_));
|
| + },
|
| +
|
| + /**
|
| + * @param {!Event} e
|
| + * @private
|
| + */
|
| + onItemBlur_: function(e) {
|
| + if (this.$$('paper-menu').items.indexOf(e.relatedTarget) >= 0)
|
| + return;
|
| +
|
| + // This can be this.$.more.restoreFocusOnClose = false when this lands:
|
| + // https://github.com/PolymerElements/paper-menu-button/pull/94
|
| + this.$.more.$.dropdown.restoreFocusOnClose = false;
|
| + this.closeMoreActions_();
|
| + this.$.more.$.dropdown.restoreFocusOnClose = true;
|
| },
|
|
|
| /** @private */
|
| onPaperDropdownOpen_: function() {
|
| - this.boundResize_ = this.boundResize_ || function() {
|
| - this.$.more.close();
|
| - }.bind(this);
|
| - window.addEventListener('resize', this.boundResize_);
|
| + this.boundClose_ = this.boundClose_ || this.closeMoreActions_.bind(this);
|
| + window.addEventListener('resize', this.boundClose_);
|
| },
|
|
|
| /**
|
|
|