| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview Assertion support. | 6 * @fileoverview Assertion support. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Verify |condition| is truthy and return |condition| if so. | 10 * Verify |condition| is truthy and return |condition| if so. |
| (...skipping 11713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11724 | 11724 |
| 11725 /** | 11725 /** |
| 11726 * @param {!Event} e | 11726 * @param {!Event} e |
| 11727 * @private | 11727 * @private |
| 11728 */ | 11728 */ |
| 11729 onItemBlur_: function(e) { | 11729 onItemBlur_: function(e) { |
| 11730 var menu = /** @type {PaperMenuElement} */(this.$$('paper-menu')); | 11730 var menu = /** @type {PaperMenuElement} */(this.$$('paper-menu')); |
| 11731 if (menu.items.indexOf(e.relatedTarget) >= 0) | 11731 if (menu.items.indexOf(e.relatedTarget) >= 0) |
| 11732 return; | 11732 return; |
| 11733 | 11733 |
| 11734 // This can be this.$.more.restoreFocusOnClose = false when this lands: | 11734 this.$.more.restoreFocusOnClose = false; |
| 11735 // https://github.com/PolymerElements/paper-menu-button/pull/94 | |
| 11736 this.$.more.$.dropdown.restoreFocusOnClose = false; | |
| 11737 this.closeMoreActions_(); | 11735 this.closeMoreActions_(); |
| 11738 this.$.more.$.dropdown.restoreFocusOnClose = true; | 11736 this.$.more.restoreFocusOnClose = true; |
| 11739 }, | 11737 }, |
| 11740 | 11738 |
| 11741 /** @private */ | 11739 /** @private */ |
| 11742 onPaperDropdownOpen_: function() { | 11740 onPaperDropdownOpen_: function() { |
| 11743 this.boundClose_ = this.boundClose_ || this.closeMoreActions_.bind(this); | 11741 this.boundClose_ = this.boundClose_ || this.closeMoreActions_.bind(this); |
| 11744 window.addEventListener('resize', this.boundClose_); | 11742 window.addEventListener('resize', this.boundClose_); |
| 11745 }, | 11743 }, |
| 11746 | 11744 |
| 11747 /** | 11745 /** |
| 11748 * @param {!CustomEvent} event | 11746 * @param {!CustomEvent} event |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11956 Manager.get().updateItem_(index, data); | 11954 Manager.get().updateItem_(index, data); |
| 11957 }; | 11955 }; |
| 11958 | 11956 |
| 11959 return {Manager: Manager}; | 11957 return {Manager: Manager}; |
| 11960 }); | 11958 }); |
| 11961 // Copyright 2015 The Chromium Authors. All rights reserved. | 11959 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 11962 // Use of this source code is governed by a BSD-style license that can be | 11960 // Use of this source code is governed by a BSD-style license that can be |
| 11963 // found in the LICENSE file. | 11961 // found in the LICENSE file. |
| 11964 | 11962 |
| 11965 window.addEventListener('load', downloads.Manager.onLoad); | 11963 window.addEventListener('load', downloads.Manager.onLoad); |
| OLD | NEW |