Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#32057 new defect (bug)

fix: allow plugins to access click event in edit inline post

Reported by: wasikuss's profile wasikuss Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Posts, Post Types Keywords:
Focuses: javascript, administration Cc:

Description

I wanted to add custom functionality to inline post edit, but there is code that prevents me from doing this.

---trunk---

in /wp-admin/js/inline-edit-post.js, line 53

51:	$('#the-list').on('click', 'a.editinline', function(){
52:		inlineEditPost.edit(this);
53:		return false;
54:	});

fix:

51:	$('#the-list').on('click', 'a.editinline', function(e){
52:		inlineEditPost.edit(this);
53:		e.preventDefault();
54:	});

but first time appered in 2.7

82:	addEvents : function(r) {
83:		r.each(function() {
84:			var row = $(this);
85:			$('a.editinline', row).click(function() { inlineEditPost.edit(this); return false; });
86:		});
87:	},

Change History (3)

#1 @SergeyBiryukov
9 years ago

  • Component changed from Plugins to Posts, Post Types

#2 @valendesigns
9 years ago

@wasikuss You could always create a patch with your code. Or do you still need to get setup to run patches against Core?

#3 @johnbillion
9 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Type changed from enhancement to defect (bug)
Note: See TracTickets for help on using tickets.