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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js

Issue 1468623004: Update Polymer from 1.2.1 -> 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@travis-yml
Patch Set: local-state.html Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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 c72907b6e3e00c1a91e41fe2582aaaacd6958778..802174224ce29a9f5b33797fcfcc169f8049a680 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
@@ -65,7 +65,8 @@ is separate from validation, and `allowed-pattern` does not affect how the input
* Regular expression to match valid input characters.
*/
allowedPattern: {
- type: String
+ type: String,
+ observer: "_allowedPatternChanged"
},
_previousValidInput: {
@@ -116,6 +117,11 @@ is separate from validation, and `allowed-pattern` does not affect how the input
this.fire('bind-value-changed', {value: this.bindValue});
},
+ _allowedPatternChanged: function() {
+ // Force to prevent invalid input when an `allowed-pattern` is set
+ this.preventInvalidInput = this.allowedPattern ? true : false;
+ },
+
_onInput: function() {
// Need to validate each of the characters pasted if they haven't
// been validated inside `_onKeypress` already.

Powered by Google App Engine
This is Rietveld 408576698