mathiasbynens / jquery-placeholder

A jQuery plugin that enables HTML5 placeholder behavior for browsers that aren’t trying hard enough yet
https://mths.be/placeholder
MIT License
3.98k stars 1.34k forks source link

Fix triggering blur error manually and other errors #259

Closed Alex1990 closed 9 years ago

Alex1990 commented 9 years ago

The demo after fixing the above errors: http://alex1990.github.io/misc/placeholder-polyfill-test/placeholder-polyfill-test.html

amerikan commented 9 years ago

@Alex1990 looks good. I'm going to do some additional testing on it. Can you rebase? So that I can merge. Thanks!

Alex1990 commented 9 years ago

Okay! @amerikan I've fixed the chainability of the val() method for password. For example:

  $('#password').val('aaa');
  $('#password').val('');

  $('#password').val('aaa').val('').val();
  $('#password').val();

  $('#password').val('aaa').val('bb').val();
  $('#password').val();

  $('#password').val('').val('').val();
  $('#password').val();

You can check the online demo http://alex1990.github.io/misc/placeholder-polyfill-test/placeholder-polyfill-test.html.