| Index: third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tab-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tab-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tab-extracted.js
|
| index ff390ed303beb33241a0c380f92e066f8e7ba03e..640f02b1323d53588fa469ae3ab69f2289c48ac6 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tab-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tab-extracted.js
|
| @@ -7,12 +7,27 @@ Polymer({
|
| Polymer.PaperRippleBehavior
|
| ],
|
|
|
| + properties: {
|
| +
|
| + /**
|
| + * If true, the tab will forward keyboard clicks (enter/space) to
|
| + * the first anchor element found in its descendants
|
| + */
|
| + link: {
|
| + type: Boolean,
|
| + value: false,
|
| + reflectToAttribute: true
|
| + }
|
| +
|
| + },
|
| +
|
| hostAttributes: {
|
| role: 'tab'
|
| },
|
|
|
| listeners: {
|
| - down: '_updateNoink'
|
| + down: '_updateNoink',
|
| + tap: '_onTap'
|
| },
|
|
|
| attached: function() {
|
| @@ -26,5 +41,24 @@ Polymer({
|
|
|
| _updateNoink: function() {
|
| this.noink = !!this.noink || !!this._parentNoink;
|
| + },
|
| +
|
| + _onTap: function(event) {
|
| + if (this.link) {
|
| + var anchor = this.queryEffectiveChildren('a');
|
| +
|
| + if (!anchor) {
|
| + return;
|
| + }
|
| +
|
| + // Don't get stuck in a loop delegating
|
| + // the listener from the child anchor
|
| + if (event.target === anchor) {
|
| + return;
|
| + }
|
| +
|
| + anchor.click();
|
| + }
|
| }
|
| +
|
| });
|
|
|