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

The placeholder gets converted into value upon toUpperCase operations. - IE 9 #207

Open
vishwasjois opened this issue May 13, 2014 · 1 comment

Comments

@vishwasjois
Copy link

Code Snippet :

var caller = event.target || event.srcElement;
 $(caller).val($(caller).val().toUpperCase());

Using Backbone.js + Jquery 1.9.1
In this case $(caller) is just the element from which the event is triggered.
$(caller) will be something like this :-

<input type="text" name="name123" id="name123" placeholder="Serial Number, IMEI, MEID" maxlength="20" autocomplete="off" spellcheck="false" class="customInput">

to handle this issue. I 'm manually checking with below code.

if ($('#name123').val() !=  $('#name123').attr('placeholder')) {
// Send value to server
}

it will be good if the toUpperCase / toLowerCase scenarios are handled by the plugin.
Otherwise the plugin works as expected.

Thanks.

@vishwasjois
Copy link
Author

Also observed the following :
The placeholder text turns to be the Input field's value when you manually call $('#ElementId').blur();

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

No branches or pull requests

1 participant