| Index: third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
|
| index 802174224ce29a9f5b33797fcfcc169f8049a680..ba71342b72be1b195ce4c54576f4a154549418d3 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
|
| @@ -54,15 +54,17 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
|
|
| /**
|
| * Set to true to prevent the user from entering invalid input. The new input characters are
|
| - * matched with `allowedPattern` if it is set, otherwise it will use the `pattern` attribute if
|
| - * set, or the `type` attribute (only supported for `type=number`).
|
| + * matched with `allowedPattern` if it is set, otherwise it will use the `type` attribute (only
|
| + * supported for `type=number`).
|
| */
|
| preventInvalidInput: {
|
| type: Boolean
|
| },
|
|
|
| /**
|
| - * Regular expression to match valid input characters.
|
| + * Regular expression expressing a set of characters to enforce the validity of input characters.
|
| + * The recommended value should follow this format: `[a-ZA-Z0-9.+-!;:]` that list the characters
|
| + * allowed as input.
|
| */
|
| allowedPattern: {
|
| type: String,
|
| @@ -90,8 +92,6 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
| var pattern;
|
| if (this.allowedPattern) {
|
| pattern = new RegExp(this.allowedPattern);
|
| - } else if (this.pattern) {
|
| - pattern = new RegExp(this.pattern);
|
| } else {
|
| switch (this.type) {
|
| case 'number':
|
| @@ -111,7 +111,7 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
| */
|
| _bindValueChanged: function() {
|
| if (this.value !== this.bindValue) {
|
| - this.value = !(this.bindValue || this.bindValue === 0) ? '' : this.bindValue;
|
| + this.value = !(this.bindValue || this.bindValue === 0 || this.bindValue === false) ? '' : this.bindValue;
|
| }
|
| // manually notify because we don't want to notify until after setting value
|
| this.fire('bind-value-changed', {value: this.bindValue});
|
| @@ -220,8 +220,8 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
| if (this.hasValidator()) {
|
| valid = Polymer.IronValidatableBehavior.validate.call(this, this.value);
|
| } else {
|
| - this.invalid = !this.validity.valid;
|
| - valid = this.validity.valid;
|
| + valid = this.checkValidity();
|
| + this.invalid = !valid;
|
| }
|
| this.fire('iron-input-validate');
|
| return valid;
|
|
|