Make WordPress Core

Opened 12 years ago

Last modified 7 years ago

#32057 new defect (bug)

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

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

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
12 years ago

  • Component Plugins → Posts, Post Types

#2 @valendesigns
12 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
12 years ago

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