Skip to:
Content

Opened 7 months ago

Closed 6 months ago

#7556 closed defect (bug) (fixed)

confirmation message problem (on activity delete)

Reported by: 7asobate Owned by: djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version: 1.2
Component: Core Keywords: has-patch
Cc:

Description

The delete button doesn't trigger the confirmation "are you sure" alert on the newly added activities and the activities that are shown after clicking on the "load more" button.
I think buddypress/bp-core/js/confirm.js should change from

jQuery( document ).ready( function() {
	jQuery( 'a.confirm').click( function() {
		if ( confirm( BP_Confirm.are_you_sure ) ) {
			return true;
		} else {
			return false;
		}
	});
});

to something like this

jQuery( document ).ready( function() {
	jQuery('#buddypress').on( 'click', 'a.confirm', function() {
		if ( confirm( BP_Confirm.are_you_sure ) ) {
			return true;
		} else {
			return false;
		}
	});
});

Attachments (1)

7556.patch (477 bytes) - added by yahil 7 months ago.

Download all attachments as: .zip

Change History (6)

@yahil
7 months ago

#1 @yahil
7 months ago

@7asobate Agree with you, we should use .on for dynamical elements.

#2 @yahil
7 months ago

  • Keywords has-patch added

#3 @7asobate
6 months ago

Come on, does it normally take that long to address such a small problem?

Last edited 6 months ago by 7asobate (previous) (diff)

#4 @r-a-y
6 months ago

  • Component changed from (not sure) to Core
  • Milestone changed from Awaiting Review to 3.0
  • Version set to 1.2

@7asobate - Thanks for your ticket, but it was too late to add this to the 2.9 development cycle.

We'll be sure to fix this for 3.0.

#5 @djpaul
6 months ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11665:

Core: fix "are you sure" javascript not affecting elements added after page load.

Fixes #7556

Props yahil

Note: See TracTickets for help on using tickets.