Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-input-container: Label stays floating if required and empty when you change focus #1201

Closed
epelc opened this issue Jan 15, 2015 · 5 comments

Comments

@epelc
Copy link
Contributor

epelc commented Jan 15, 2015

image
If you have an input that is required and you fill something in then delete it the label will stay floating no matter what you do.

Example markup

<md-input-container flex>
    <label>Zip Code</label>
    <input ng-model="Address.Zipcode" required>
</md-input-container>

Version: 0.7.0-rc3

@itajaja
Copy link

itajaja commented Jan 15, 2015

even when it's not required actually. Same 0.7.0-rc3 version

@epelc
Copy link
Contributor Author

epelc commented Jan 15, 2015

O I just noticed that too

@epelc
Copy link
Contributor Author

epelc commented Jan 15, 2015

Also its just in chrome ie11 and firefox dont have this issue. Can anyone confirm this on a mac? Mine is at home.

@mckenzielong
Copy link
Contributor

Seems like there should be a check for value on blur?

      .on('blur', function(ev) {
        containerCtrl.setFocused(false);
        containerCtrl.setHasValue(checkHasValue())
      });

@ajoslin
Copy link
Contributor

ajoslin commented Jan 15, 2015

I'll add the blur check.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants