-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
IE<=9 blur.placeholder #109
Comments
The following fix works: Add: || input.value == $input.attr('placeholder') So setPlaceholder() looks like this: function setPlaceholder() {
var $replacement,
input = this,
$input = $(input),
$origInput = $input,
id = this.id;
if (input.value == '' || input.value == $input.attr('placeholder')) { |
I can confirm this issue. Here is a test page demonstrating how calling |
This should fix issue mathiasbynens#109 upstream.
Why are you calling |
I'm calling |
I can confirm that the fix jli3238 posted works. |
I can confirm that the fix jli3238 posted works too. |
Placeholder attribute becomes the value of the element when triggering "blur.placeholder"
This is the case for IE<-9 where the placeholder value ends up in the value attribute of the element. The text from the palceholder remains in the attribute value if the class is removed and all the action performed with the value attribute contain the text from placeholder.
Possible solution is:
to add the following code to the else branch of setPlaceholder method, just before the
The text was updated successfully, but these errors were encountered: