[wp-trac] [WordPress Trac] #32057: fix: allow plugins to access click event in edit inline post
WordPress Trac
noreply at wordpress.org
Wed Apr 22 12:04:00 UTC 2015
#32057: fix: allow plugins to access click event in edit inline post
----------------------------------------+-----------------------------
Reporter: wasikuss | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 2.7
Severity: normal | Keywords:
Focuses: javascript, administration |
----------------------------------------+-----------------------------
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: },
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32057>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list