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

IE8/9 Placeholders.disable() retains focus/blur event listeners #86

Open
chriswetterman opened this issue Dec 4, 2014 · 1 comment
Open

Comments

@chriswetterman
Copy link

This probably affects all browsers but in my testing calling Placeholders.disable( elem ) removes the placeholder as expected, but subsequently giving the input field focus and then blurring with the mouse restores the placeholder value on the empty field. My expectation of calling Placeholder.disable( elem ) is that placeholder behavior will not return until Placeholder.enable( elem ) is explicitly called. Looking through the code it appears there is no removeEventListener support for focus/blur events and that is what's needed to resolve this issue when calling Placeholder.disable().

@jamesallardice
Copy link
Owner

The method is perhaps named badly. It will hide the placeholder for the given element (or all elements if none are passed to it) but not actually "disable" the functionality. Thanks for reporting this... I'd never really considered it! I'll think about the best way to improve it.

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

No branches or pull requests

2 participants