cvn / angular-shims-placeholder

Angular directive to emulate the placeholder attribute on text and password input fields for old browsers, such as IE9, IE8, and IE7. Also works on textareas and html5 input types.
MIT License
63 stars 26 forks source link

When input has focus, placeholder is not displayed (IE9) #14

Open bitliner opened 10 years ago

bitliner commented 10 years ago

Using the plugin with IE9, if the input text has focus the placeholder is not visualized.

cvn commented 10 years ago

@bitliner The placeholder disappearing on focus is the expected behavior. It matches the way most browsers worked until about a year ago, and is a little simpler to implement.

I've thought about adding an option to "show placeholder while focused". It would take some work though, and I have no current plans to do it. I'd be happy to offer assistance if anyone else wants to give it a shot.

bitliner commented 10 years ago

I think from a UX point of view showing the placeholder even if the input is focused is much better (think about the situation when an input has focus as default, you never see that placeholder, you never know what the app expects to be typed in that input).

Now chrome and other browsers have this behaviour.

As soon as I have time I will have a look to integrate this feature.