diff --git a/bower.json b/bower.json index a936f707..e6249c0f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "material-design-lite", - "version": "1.0.4", + "version": "1.0.5", "homepage": "https://github.com/google/material-design-lite", "authors": [ "Material Design Lite team" diff --git a/docs/_templates/customize.html b/docs/_templates/customize.html index e17bc01f..1fa911f2 100644 --- a/docs/_templates/customize.html +++ b/docs/_templates/customize.html @@ -9,13 +9,13 @@ - - - - + + + + - - + + diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 57a00f5d..5260df86 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -27,7 +27,7 @@ - + + min="0" max="100" value="0" tabindex="0"> diff --git a/src/slider/snippets/slider-starting-value.html b/src/slider/snippets/slider-starting-value.html index 863a2cc0..80f97b93 100644 --- a/src/slider/snippets/slider-starting-value.html +++ b/src/slider/snippets/slider-starting-value.html @@ -1,3 +1,3 @@ + min="0" max="100" value="25" tabindex="0"> diff --git a/src/switch/README.md b/src/switch/README.md index 39306962..914d9ca4 100755 --- a/src/switch/README.md +++ b/src/switch/README.md @@ -19,20 +19,20 @@ To use any MDL component, you must include the minified CSS and JavaScript files  2. Inside the label, code an `` element and give it a `type` attribute whose value is `"checkbox"`. Also give it an `id` attribute whose value matches the label's `for` attribute value. ```html ```  3. Also inside the label, after the checkbox, code a `` element containing the switch's text caption. ```html ```  4. Add one or more MDL classes, separated by spaces, to the label, switch, and caption using the `class` attribute. ```html ``` @@ -45,7 +45,7 @@ A switch with a ripple click effect. ```html ``` @@ -61,5 +61,5 @@ The MDL CSS classes apply various predefined visual and behavioral enhancements | `mdl-switch__label` | Applies basic MDL behavior to caption | Required on span element (caption) | | `mdl-js-ripple-effect` | Applies *ripple* click effect | Optional; goes on label element, not input element (switch) | ->**Note:** Disabled versions of all available switch types are provided, and are invoked with the standard HTML boolean attribute `disabled`. `` +>**Note:** Disabled versions of all available switch types are provided, and are invoked with the standard HTML boolean attribute `disabled`. `` >This attribute may be added or removed programmatically via scripting. diff --git a/src/switch/snippets/switch-off.html b/src/switch/snippets/switch-off.html index b594afc8..08f2c768 100644 --- a/src/switch/snippets/switch-off.html +++ b/src/switch/snippets/switch-off.html @@ -1,4 +1,4 @@ diff --git a/src/switch/snippets/switch-on.html b/src/switch/snippets/switch-on.html index 17bc939b..cc44cee4 100644 --- a/src/switch/snippets/switch-on.html +++ b/src/switch/snippets/switch-on.html @@ -1,4 +1,4 @@ diff --git a/src/textfield/README.md b/src/textfield/README.md index 2fdfb9f7..91420648 100755 --- a/src/textfield/README.md +++ b/src/textfield/README.md @@ -21,20 +21,20 @@ There are three main types of text fields in the text field component, each with  2. Inside the div, code an `` element with a `type` attribute of `"text"` (the text field), and an `id` attribute of your choice. ```html
- +
```  3. Also inside the div, after the text field, code a `
- +
@@ -199,7 +199,7 @@ Multi-line text field with multiple visible input lines and a maximum number of search
- +
@@ -216,7 +216,7 @@ Expandable text field with a standard label. search
- +
@@ -230,7 +230,7 @@ Expandable text field with a floating label. search
- + @@ -256,5 +256,5 @@ The MDL CSS classes apply various predefined visual and behavioral enhancements (1) The "search" icon is used here as an example. Other icons can be used by modifying the text. For a list of available icons, see [this page](https://www.google.com/design/icons). ->**Note:** Disabled versions of each text field type are provided, and are invoked with the standard HTML boolean attribute `disabled`. `` +>**Note:** Disabled versions of each text field type are provided, and are invoked with the standard HTML boolean attribute `disabled`. `` >This attribute may be added or removed programmatically via scripting. diff --git a/src/textfield/snippets/textfield-expanding.html b/src/textfield/snippets/textfield-expanding.html index 07c1d45e..53453e44 100644 --- a/src/textfield/snippets/textfield-expanding.html +++ b/src/textfield/snippets/textfield-expanding.html @@ -5,7 +5,7 @@ search
- +
diff --git a/src/textfield/snippets/textfield-floating-numeric.html b/src/textfield/snippets/textfield-floating-numeric.html index d7af6396..a08e55a0 100644 --- a/src/textfield/snippets/textfield-floating-numeric.html +++ b/src/textfield/snippets/textfield-floating-numeric.html @@ -1,7 +1,7 @@
- + Input is not a number!
diff --git a/src/textfield/snippets/textfield-floating-text.html b/src/textfield/snippets/textfield-floating-text.html index da93a84d..c2708b96 100644 --- a/src/textfield/snippets/textfield-floating-text.html +++ b/src/textfield/snippets/textfield-floating-text.html @@ -2,7 +2,7 @@
- +
diff --git a/src/textfield/snippets/textfield-numeric.html b/src/textfield/snippets/textfield-numeric.html index f50221d3..2c87b7e3 100644 --- a/src/textfield/snippets/textfield-numeric.html +++ b/src/textfield/snippets/textfield-numeric.html @@ -1,7 +1,7 @@
- + Input is not a number!
diff --git a/src/textfield/snippets/textfield-text.html b/src/textfield/snippets/textfield-text.html index dc4ed0e9..e93667e9 100644 --- a/src/textfield/snippets/textfield-text.html +++ b/src/textfield/snippets/textfield-text.html @@ -1,7 +1,7 @@
- +
diff --git a/src/textfield/textfield.js b/src/textfield/textfield.js index 9b8c9f12..be052353 100644 --- a/src/textfield/textfield.js +++ b/src/textfield/textfield.js @@ -142,10 +142,12 @@ * @public */ MaterialTextfield.prototype.checkValidity = function() { - if (this.input_.validity.valid) { - this.element_.classList.remove(this.CssClasses_.IS_INVALID); - } else { - this.element_.classList.add(this.CssClasses_.IS_INVALID); + if (this.input_.validity) { + if (this.input_.validity.valid) { + this.element_.classList.remove(this.CssClasses_.IS_INVALID); + } else { + this.element_.classList.add(this.CssClasses_.IS_INVALID); + } } }; MaterialTextfield.prototype['checkValidity'] = @@ -198,6 +200,8 @@ if (value) { this.input_.value = value; + } else { + this.input_.value = ''; } this.updateClasses_(); }; diff --git a/templates/android-dot-com/index.html b/templates/android-dot-com/index.html index cd12a606..ae4a2376 100644 --- a/templates/android-dot-com/index.html +++ b/templates/android-dot-com/index.html @@ -56,7 +56,7 @@ search
- +
diff --git a/templates/article/index.html b/templates/article/index.html index 2850af2e..5f7cefa3 100644 --- a/templates/article/index.html +++ b/templates/article/index.html @@ -37,7 +37,7 @@ - +