Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maxlength attribute broken #106

Open
devbranch-vadym opened this issue Aug 25, 2016 · 1 comment
Open

Maxlength attribute broken #106

devbranch-vadym opened this issue Aug 25, 2016 · 1 comment

Comments

@devbranch-vadym
Copy link

Placeholders.js code accesses maxlength attribute using the object notation in the showPlaceholder:

      if ( !maxLength ) {
        elem.setAttribute(ATTR_MAXLENGTH, elem.maxLength);
        elem.removeAttribute('maxLength');
      }

The code is case sensitive and fetches attribute value as undefined if it's named in some other manner like maxlength or MAXLENGTH (at least for IE8).

The undefined value is then written back in the hidePlaceholder.

devbranch-vadym pushed a commit to devbranch-vadym/Placeholders.js that referenced this issue Aug 25, 2016
@devbranch-vadym
Copy link
Author

Pull request #107 .

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

No branches or pull requests

1 participant