| Index: third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-inky-focus-behavior-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-inky-focus-behavior-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-inky-focus-behavior-extracted.js
|
| index 9130ec1070ff8c9f2e95df15f9935d2f9e4c1084..6d8bc12d357f3c808a5d18ac621ad80bdaee985d 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-inky-focus-behavior-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-inky-focus-behavior-extracted.js
|
| @@ -1,9 +1,7 @@
|
| -
|
| -
|
| - /**
|
| +/**
|
| * `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has keyboard focus.
|
| *
|
| - * @polymerBehavior Polymer.PaperInkyFocusBehavior
|
| + * @polymerBehavior Polymer.PaperInkyFocusBehaviorImpl
|
| */
|
| Polymer.PaperInkyFocusBehaviorImpl = {
|
|
|
| @@ -12,11 +10,20 @@
|
| ],
|
|
|
| _focusedChanged: function(receivedFocusFromKeyboard) {
|
| - if (!this.$.ink) {
|
| - return;
|
| + if (receivedFocusFromKeyboard) {
|
| + this.ensureRipple();
|
| }
|
| -
|
| - this.$.ink.holdDown = receivedFocusFromKeyboard;
|
| + if (this.hasRipple()) {
|
| + this._ripple.holdDown = receivedFocusFromKeyboard;
|
| + }
|
| + },
|
| +
|
| + _createRipple: function() {
|
| + var ripple = Polymer.PaperRippleBehavior._createRipple();
|
| + ripple.id = 'ink';
|
| + ripple.setAttribute('center', '');
|
| + ripple.classList.add('circle');
|
| + return ripple;
|
| }
|
|
|
| };
|
| @@ -25,6 +32,6 @@
|
| Polymer.PaperInkyFocusBehavior = [
|
| Polymer.IronButtonState,
|
| Polymer.IronControlState,
|
| + Polymer.PaperRippleBehavior,
|
| Polymer.PaperInkyFocusBehaviorImpl
|
| - ];
|
| -
|
| + ];
|
|
|