+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14

Thread: wp_enqueue_script and login_head

  1. #11
    Otto's Avatar
    Otto is offline Trac Master
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    770

    Default

    It's because it's using the blur() event when it should be using the change() event.

    http://docs.jquery.com/Events/change#fn

    Binds a function to the change event of each matched element.
    The change event fires when a control loses the input focus and its value has been modified since gaining focus.

  2. #12
    itsananderson's Avatar
    itsananderson is offline Big Tipper
    Join Date
    Jan 2009
    Location
    Terre Haute, IN
    Posts
    354

    Default

    It's still possible that that's the intended functionality, which is why I asked whether it was a bug or a feature. The change() event would indeed be the correct thing to use if the gravatar is only to be updated when the email is changed. It could be that it's working correctly though. For example, if I change my gravatar while registering, I could simply focus/blur the email field to update.

  3. #13
    epicalex's Avatar
    epicalex is offline Hello World
    Join Date
    May 2009
    Location
    London, Berlin, Paris
    Posts
    41

    Default

    I decided to use the blur() event and not change(), because in my testing, if I used change(), there was one situation where the gravatar wouldn't update. If your browser stores previously entered values for similar fields such as email, as chrome does in a drop down list, and you choose one of those after typing a few characters then click out of the field, no update occurs.

    However, I agree that change() is certainly better in terms of how the effect looks. So maybe there's a workaround. I'll have to have a think!

    @itsananderson -
    For example, if I change my gravatar while registering, I could simply focus/blur the email field to update.
    - TBH, I'd never thought about that, but I'd suggest that that situation probably doesn't occur all too often!

    @Otto - Glad you like it! So is it worth releasing?

  4. #14
    epicalex's Avatar
    epicalex is offline Hello World
    Join Date
    May 2009
    Location
    London, Berlin, Paris
    Posts
    41

    Default

    Well, I went ahead and released it. I know it still might be a little buggy, but the more users testing the better. http://epicalex.com/gravajax-registration/

    Thanks again all for your help, and please continue to send feedback!

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts