[wp-trac] [WordPress Trac] #19611: Editor shows edit/remove image buttons when it should not
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 24 08:07:01 UTC 2012
#19611: Editor shows edit/remove image buttons when it should not
--------------------------+------------------------------
Reporter: sirzooro | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 3.3
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Changes (by solarissmoke):
* keywords: needs-patch => has-patch
Comment:
This is caused by the following line in
`wpeditimage/editor_plugin_src.js`:
{{{
if ( e.target && ( e.target.nodeName == 'IMG' || (e.target.firstChild &&
e.target.firstChild.nodeName == 'IMG') ) ) {
}}}
If you click on anything whose first child is an image (as in the example
code above - the image is the first child of the paragraph tag), then it
will display the image edit buttons, even if the target has other
contents.
Attached patch fixes it (at least in FF 10, Opera 11 and IE 9), and
shouldn't mess with the original intention which is to show the image
buttons when a container block is clicked.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19611#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list