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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-menu-button/paper-menu-button-extracted.js

Issue 2171073002: MD Downloads: roll <paper-menu-button> to pick up restoreFocusOnClose change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@roll-polymer
Patch Set: . Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 (function() { 1 (function() {
2 'use strict'; 2 'use strict';
3 3
4 var config = { 4 var config = {
5 ANIMATION_CUBIC_BEZIER: 'cubic-bezier(.3,.95,.5,1)', 5 ANIMATION_CUBIC_BEZIER: 'cubic-bezier(.3,.95,.5,1)',
6 MAX_ANIMATION_TIME_MS: 400 6 MAX_ANIMATION_TIME_MS: 400
7 }; 7 };
8 8
9 var PaperMenuButton = Polymer({ 9 var PaperMenuButton = Polymer({
10 is: 'paper-menu-button', 10 is: 'paper-menu-button',
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 * to itself when opened. 189 * to itself when opened.
190 * Set to true in order to prevent scroll from being constrained 190 * Set to true in order to prevent scroll from being constrained
191 * to the dropdown when it opens. 191 * to the dropdown when it opens.
192 */ 192 */
193 allowOutsideScroll: { 193 allowOutsideScroll: {
194 type: Boolean, 194 type: Boolean,
195 value: false 195 value: false
196 }, 196 },
197 197
198 /** 198 /**
199 * Whether focus should be restored to the button when the menu closes .
200 */
201 restoreFocusOnClose: {
202 type: Boolean,
203 value: true
204 },
205
206 /**
199 * This is the element intended to be bound as the focus target 207 * This is the element intended to be bound as the focus target
200 * for the `iron-dropdown` contained by `paper-menu-button`. 208 * for the `iron-dropdown` contained by `paper-menu-button`.
201 */ 209 */
202 _dropdownContent: { 210 _dropdownContent: {
203 type: Object 211 type: Object
204 } 212 }
205 }, 213 },
206 214
207 hostAttributes: { 215 hostAttributes: {
208 role: 'group', 216 role: 'group',
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 329 }
322 } 330 }
323 }); 331 });
324 332
325 Object.keys(config).forEach(function (key) { 333 Object.keys(config).forEach(function (key) {
326 PaperMenuButton[key] = config[key]; 334 PaperMenuButton[key] = config[key];
327 }); 335 });
328 336
329 Polymer.PaperMenuButton = PaperMenuButton; 337 Polymer.PaperMenuButton = PaperMenuButton;
330 })(); 338 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698