Git Product home page Git Product logo

Comments (8)

jamesallardice avatar jamesallardice commented on August 22, 2024

This is listed in the Known Issues in the Readme. The reasons for this are as follows:

  • It's not possible change the type property of an input element in Internet Explorer (therefore we can't change it to "text" temporarily, at least not in IE).
  • We could overlay a new element and put the placeholder text in that, but it seems like a messy solution. I did have an experimental version that did just that a while back, but I removed it because it didn't really work.

The overlay is probably the only real solution that will work in all browsers, and I may put together a new version that does that when I get a chance. I may also add in the type property change that would allow password types to work in everything but IE, although there doesn't seem to be much demand for that, seeing as the main target of the library is really IE (all other major browsers have supported the placeholder attribute natively for a few major versions now).

If you have any other ideas I'd love to hear them!

from placeholders.js.

luckyshot avatar luckyshot commented on August 22, 2024

As per what you say in this thread and in the Known Issues the option of the new element overlaid may be the best.

Would dropping support for IE6 be of any help? Everyone is IE7+ right now (even the big players) so maybe that can help both optimize the code and fix this password issue.

Thanks a lot James, you've coded a great plugin!

from placeholders.js.

jamesallardice avatar jamesallardice commented on August 22, 2024

@luckyshot Thanks :)

I don't want to remove IE6 support. This polyfill was always intended to be as comprehensive as possible, and part of that was supporting as many browsers as possible. IE6 support is unfortunately still necessary to many developers (I have to deal with it on a regular basis). In any case, you can't change the type property in IE below 9, so dropping IE6 won't help on that front!

However, you can change the type property in IE9, and since 9 is pretty widespread these days, I think it will be worth adding in the type change fix which will allow us to properly handle password inputs in all browsers except IE8 and below. Not perfect, but it does make the polyfill that little bit more comprehensive. I'm putting together the code for that now, so expect to see a new version up on GitHub shortly!

from placeholders.js.

jamesallardice avatar jamesallardice commented on August 22, 2024

I have pushed a change that adds proper password input support in all browsers except IE8 and below.

from placeholders.js.

vijaybrr avatar vijaybrr commented on August 22, 2024

Thanks for the great plugin. I am still seeing this issue with password fields appearing as dots. Just wanted to know if this issue is fixed or still a known issue.

from placeholders.js.

jamesallardice avatar jamesallardice commented on August 22, 2024

The plugin will work for password fields in all browsers except IE8 and older versions of IE. This is due to a design choice of the plugin - the only way to handle password fields in those browsers is to create a new element and lie it on top of the original one. I didn't want to mess with the DOM in this plugin, so that approach is out of the question. In other browsers it's handled by changing the type property of the input, but older versions of IE don't allow this.

Unfortunately, for the time being at least, I can't see a way to fix this.

from placeholders.js.

vijaybrr avatar vijaybrr commented on August 22, 2024

many thanks for the reply, I have tested it in IE9 and it din't work.

from placeholders.js.

jamesallardice avatar jamesallardice commented on August 22, 2024

Thanks. I'm not sure how that broke, but you are right! I've created a new issue to track this: #21

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.