Comments (8)
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 aninput
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.
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.
@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.
I have pushed a change that adds proper password input support in all browsers except IE8 and below.
from placeholders.js.
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.
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.
many thanks for the reply, I have tested it in IE9 and it din't work.
from placeholders.js.
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)
- Text-Indent glitch
- Having two fields using the same model causes one to stay placeholdery HOT 2
- Hide on input not working for IE 10 & IE 11 HOT 1
- placeholders events aren't bound on cloned inputs HOT 1
- IE8/9 Placeholders.disable() retains focus/blur event listeners HOT 1
- not removing placeholderjs css class for preloaded text fields HOT 1
- Github site went dead HOT 2
- Clear placeholder on focus
- Publish on NPM HOT 14
- ie7 input type password can not use HOT 2
- Changing placeholder text color HOT 3
- Respect input::placeholder:after css selector in IE9
- Placeholder should disappear on mouse-paste when data-placeholder-focus="false"
- Different styles for active and normal placeholder
- How to switch text off before validation and then put it back on after validation
- Does this support :placeholder-shown css selector?
- Does this support :placeholder-shown?
- [IE11] Placeholder.nativeSupport not working
- Maxlength attribute broken HOT 1
- Can we use this plugin for Angular app HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from placeholders.js.