[wp-trac] [WordPress Trac] #19165: TinyMCE throws error on mousedown (error in wpEditImage)
WordPress Trac
wp-trac at lists.automattic.com
Sat Nov 5 16:53:57 UTC 2011
#19165: TinyMCE throws error on mousedown (error in wpEditImage)
--------------------------+-----------------------------
Reporter: joehoyle | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: 3.3
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
In trunk, a JS error in thrown in your mousedown on an element that is not
an image and has no child elements.
This is due to the wpEditImage mousedown handler:
{{{
if ( e.target && (e.target.nodeName == 'IMG' ||
e.target.firstChild.nodeName == 'IMG') ) {
}}}
Steps to reproduce:
1. Create a new post, paste the folling into the HTML view
{{{
<input type="text" value="foo" />
}}}
2. Switch to Visual, click on the input
Observed Result:
JS Error "Uncaught TypeError: Cannot read property 'nodeName' of null"
Attached patch to fix
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19165>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list