Fix .newcomment transparency animation (5 posts)

  1. Adam Backstrom
    Posted 4 years ago #

    New comments loaded via ajax are animated to have a transparent background, with a callback to remove the "newcomment" class when the animation is complete. There are two issues with the current code:

    1. The current version of jquery-color cannot animate background-color to transparent, it simply animates to white.
    2. The callback does not fire, because the function parameters are not passed in a supported way. (If the second parameter is the options object, subsequent parameters are ignored.)

    This patch fixes the callback passing and removes the white background-color when the fade is complete. Themes which have customized CSS will still see a strange transition to white, but it won't persist. This animation bug is fixed in a newer release of jquery-color, which could be bundled with P2.

    Patch: https://gist.github.com/1601019
    jQuery.animate() option parsing: https://github.com/jquery/jquery/blob/master/src/effects.js#L368
    jQuery Color: https://github.com/jquery/jquery-color


  2. Lance Willett
    Posted 4 years ago #

    Thanks much for the bug report and the patch. We'll work on it soon.

  3. astromono
    Posted 3 years ago #

    Thanks for the patch! I added the .diff changes to my p2.js file, but wasn't able to get it working. What other steps am I missing?

  4. demoman2k10
    Posted 3 years ago #

    Same issue as Astromono... Love to see someone get this fixed.

  5. Annika Backstrom
    Posted 3 years ago #

    The diff is 8 months old, so it's likely out of date with the current release of P2. Not sure I'll have any opportunity to fix it in the immediate future.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic