Skip to content

Fix $.val() - #41

Open
rthouvenin wants to merge 2 commits into
dciccale:masterfrom
rthouvenin:fix-val
Open

Fix $.val()#41
rthouvenin wants to merge 2 commits into
dciccale:masterfrom
rthouvenin:fix-val

Conversation

@rthouvenin

Copy link
Copy Markdown

Two fixes for the replacement of jQuery.val:

  • $('someQuery').val('someValue') should return the jQuery selection even if it is empty, but it was returning undefined. This breaks chained calls.
  • When an input is programmatically emptied while having the focus, it should not be put in placeholder mode. As it has focus, the user can type something in and it would be shown with placeholder style.

By the way, thanks for this plug-in, by the far the best of all solutions I have seen! :)

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

Successfully merging this pull request may close these issues.

1 participant