Git Product home page Git Product logo

Comments (9)

brettmarl avatar brettmarl commented on August 22, 2024

i fixed this locally by adding a value check on line 336:

if(element.value === "")
element.type = "text";

if i read the code right, this keeps my edit as a password field, but also adds the data-placeholder type password so that if i backspace out my password, it springs back to a clear-text input with the placeholder.

from placeholders.js.

jamesallardice avatar jamesallardice commented on August 22, 2024

Nice one, that's definitely a bug. If you fork the repository and commit your fix I can take a proper look at it in a pull request and merge it in to the main code base. Thanks for your help :)

from placeholders.js.

becoder avatar becoder commented on August 22, 2024

It's really valuable plugin and fix my problem in graceful way.

However I got this "type=password" problem in IE8, I saw the issue #21 and #6, it seems the issue has been fixed in IE9

Doest this issue already/will be fixed in IE8?

Thanks.
BR.

from placeholders.js.

jamesallardice avatar jamesallardice commented on August 22, 2024

@becoder No, there are no plans to add this functionality in IE8. As discussed in other issues, that would involve a complete change in the way the polyfill works. I do not intend to introduce new elements into the DOM, which would be the only way to do this in IE <9.

from placeholders.js.

becoder avatar becoder commented on August 22, 2024

Hi @jamesallardice

Thanks for your prompt feedback.

I understand, IE is nightmare...

BTW, if we don't need to support IE<9, I am wondering whether it's possible to let the password box empty instead of set of dot. :)

Hope it will not impact source code a lot.

Thanks.

from placeholders.js.

tazmaniax avatar tazmaniax commented on August 22, 2024

I agree, probably in the case of IE8 better to leave blank then populate with text which is displayed as the dots of an existing password

from placeholders.js.

jamesallardice avatar jamesallardice commented on August 22, 2024

That is definitely an option, but I'm reluctant to make it a default as it would change the current behaviour. I will look at adding it as an configurable option though.

from placeholders.js.

tazmaniax avatar tazmaniax commented on August 22, 2024

@becoder in the end I used this project https://github.com/matoilic/jquery.placeholder because it had the specific support for password that I needed. However, the project isn't being updated as regularly so there are pros and cons - kudos to both projects.

from placeholders.js.

GameScripting avatar GameScripting commented on August 22, 2024

This is still an issue for IE 9 (9.0.812.16421) for me

My "workaround" was to use an condition comment

<!--[if gt IE 9]>
    <script type="text/javascript" src="/content/js/Placeholders.min.js"></script>
<![endif]-->

because it's better to have no placeholders instead of clear-text passwords.

I am using knockouts data-bindings, and I think the problem should be related to knockoutjs (related: #59)

from placeholders.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.