Opened 13 years ago
Closed 13 years ago
#19165 closed defect (bug) (fixed)
TinyMCE throws error on mousedown (error in wpEditImage)
Reported by: | joehoyle | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | Cc: |
Description
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:
- Create a new post, paste the folling into the HTML view
<input type="text" value="foo" />
- Switch to Visual, click on the input
Observed Result:
JS Error "Uncaught TypeError: Cannot read property 'nodeName' of null"
Attached patch to fix
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Related: r18702