Skip to:
Content

BuddyPress.org

Changeset 11109


Ignore:
Timestamp:
09/17/2016 12:51:55 AM (9 years ago)
Author:
boonebgorges
Message:

bp-legacy: Don't allow a Favorite click when AJAX request is in progress.

This change fixes a problem where multiple clicks in a row would
cause requests to back up and do weird things to the DOM.

Props lakrisgubben.
Fixes #3412.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r11108 r11109  
    309309        /* Favoriting activity stream items */
    310310        if ( target.hasClass('fav') || target.hasClass('unfav') ) {
     311            /* Bail if a request is in progress */
     312            if ( target.hasClass( 'loading' ) ) {
     313                return false;
     314            }
     315
    311316            type      = target.hasClass('fav') ? 'fav' : 'unfav';
    312317            parent    = target.closest('.activity-item');
Note: See TracChangeset for help on using the changeset viewer.