Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update placeholder after initial load of page #111

Open
mckramer opened this Issue · 1 comment

2 participants

@mckramer

I thought I would bring this up to match native browser support of placeholder. After initial page load (<input placeholder="Old placeholder" />), I can change the placeholder attribute $input.attr('placeholder', 'New placeholder'). Native support for browsers properly updates the placeholder. However, using this plugin, clicking on the input, it will not be cleared and after blur, the old placeholder will be saved as the input value.

I am currently getting around this issue by triggering the focus and blur surrounding the attribute change:

$input.triggerHandler('focus.placeholder');
$input.attr('placeholder', 'New placeholder');
$input.triggerHandler('blur.placeholder');

I wanted to bring this up in case support for updating placeholders made sense to add to this plugin.

@jhfrench

This would be a welcome enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.