Skip to:
Content

BuddyPress.org

Changeset 6809


Ignore:
Timestamp:
02/21/2013 12:53:31 PM (11 years ago)
Author:
boonebgorges
Message:

Don't use event delegation in bp_core_confirmation_js()

Event bubbling prevents the JS confirm dialog from working properly.

This commit reverts changes introduced in #6597. See #4458

Fixes #4843. Props sbrajesh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cssjs.php

    r6790 r6809  
    1717    <script type="text/javascript">
    1818        jQuery( document ).ready( function() {
    19             jQuery( 'body' ).click( function(e) {
    20                 if ( 'a' == e.target.nodeName.toLowerCase() && jQuery(e.target).hasClass( 'confirm' ) ) {
    21                     if ( confirm( '<?php _e( 'Are you sure?', 'buddypress' ) ?>' ) )
    22                         return true; else return false;
    23                 } else {
    24                     return true;
    25                 }
     19            jQuery( 'a.confirm').click( function() {
     20                if ( confirm( '<?php _e( 'Are you sure?', 'buddypress' ) ?>' ) )
     21                    return true; else return false;
    2622            });
    2723        });
Note: See TracChangeset for help on using the changeset viewer.