material icon indicating copy to clipboard operation
material copied to clipboard

md-select is missing md-input-invalid class on its md-input-container when field is blurred

Open mpiasta-ca opened this issue 10 years ago • 10 comments

Demo: http://codepen.io/anon/pen/xZvXoM

Reproduce bug:

  1. Inspect the "Your name" field so you can see the <md-input-container>.
  2. Focus your cursor into the "Your name" field. Do not type anything, leave it blank.
  3. Tab to the "Favorite Number" field, but do not open the list and do not select any options. Notice how the parent <md-input-container> for "Your Name" field is updated with a new class "md-input-invalid".

md-select-invalid-class-1 4. Now hit tab again to leave the "Favorite Number" field. Notice that the <md-input-container> parent of "Favorite Number" is NOT updated with the expected class "md-input-invalid".

Notice (1): 5. If you NOW tab from the "Your name" field into "Favorite Number" field (meaning you tab through the field set a second time)... 6. And you tab again to blur from the "Favorite Number" field, NOW the <md-input-container> parent for "Favorite Number" will be updated with the "md-input-invalid" class.

Notice (2): 7. Refresh the codepen page to clear the form. 8. Click the "Submit" button (do not focus or type into any fields before doing this).

md-select-invalid-class-2 9. Notice that the <input> container manages to display its error message. But <md-select> container fails to display its error message. Likely caused because of the missing "md-input-invalid" class.

Notice (3): md-select-invalid-class-3 10. When you manage to get the error message to display for the <md-select> container (by tabbing in-and-away two times), the border-bottom on the field remains gray (expected color is red).

mpiasta-ca avatar Feb 23 '16 20:02 mpiasta-ca

It looks like this did not make it into the 1.0.6 release, correct?

sdesmond avatar Mar 22 '16 15:03 sdesmond

@sdesmond nope, still broken.

I updated codepen with 1.1.0-RC and the issues persist: http://codepen.io/anon/pen/jqmPWd

mpiasta-ca avatar Mar 22 '16 17:03 mpiasta-ca

Any progress on this bug?

volmerf avatar May 09 '16 11:05 volmerf

👍

michelem09 avatar May 18 '16 16:05 michelem09

+1

neclamis1285 avatar May 28 '16 22:05 neclamis1285

  • 1

fabrizio5680 avatar May 29 '16 11:05 fabrizio5680

This issue is closed as part of our ‘Surge Focus on Material 2' efforts. For details, see our forum posting @ http://bit.ly/1UhZyWs.

ThomasBurleson avatar Jun 02 '16 07:06 ThomasBurleson

Use pattern=".{1,}" instead required to fix it

adonaicruz avatar Jul 14 '16 14:07 adonaicruz

Use pattern=".{1,}" instead required to fix it

adonaicruz avatar Jul 14 '16 14:07 adonaicruz

Tested and this issue is now fixed in bower install angular-material#master.

mpiasta-ca avatar Jul 29 '16 19:07 mpiasta-ca