WordPress.org

Make WordPress Core

Opened 19 months ago

Closed 18 months ago

Last modified 18 months ago

#22124 closed defect (bug) (fixed)

Unable to switch from TinyMCE to Text Editor after inserting full size image

Reported by: raggedrobins Owned by: koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Once I insert a full size image from the old media uploader, I'm unable to switch to Text editor. Or, I am able to switch but I switch back to visual and then I'm stuck there.

Steps taken:

  1. While on the visual editor click Upload/Insert Media
  1. Upload image, select Full Size and click insert.
  1. Try to switch to Text Editor.

I made a quick screencast. http://www.screencast.com/t/pAuCqCu7ik73

It's also throwing a span tag underneath the image: <span id="__caret">_</span> (this is appearing underneath all sizes of images).

Attachments (1)

mce-view.js.diff (34.1 KB) - added by timbeks 18 months ago.
Fix for the upload of an image with option Full

Download all attachments as: .zip

Change History (11)

comment:1 markoheijnen19 months ago

  • Cc koopersmith added
  • Milestone changed from Awaiting Review to 3.5
  • Version set to trunk

Uncaught TypeError: Cannot read property 'width' of undefined mce-view.js:393
wp.media.string.image mce-view.js:393
mceview.add.text mce-view.js:432
(anonymous function) mce-view.js:343
wp.mce.view.toText mce-view.js:336
(anonymous function) editor_plugin_src.js:62
tinymce.create.dispatch tiny_mce.js:1
(anonymous function) tiny_mce.js:1
tinymce.create.dispatch tiny_mce.js:1
serialize tiny_mce.js:1
k.create.getContent tiny_mce.js:1
k.create.save tiny_mce.js:1
(anonymous function) tiny_mce.js:1
c.each tiny_mce.js:1
j.EditorManager.d.triggerSave tiny_mce.js:1
autosave autosave.js:288
$.schedule.func autosave.js:6
trampoline jquery.schedule.js:32

comment:2 SergeyBiryukov19 months ago

  • Description modified (diff)

comment:3 SergeyBiryukov19 months ago

  • Component changed from General to Media

comment:4 MikeHansenMe18 months ago

#22120 was marked as a duplicate.

timbeks18 months ago

Fix for the upload of an image with option Full

comment:5 timbeks18 months ago

  • Resolution set to fixed
  • Status changed from new to closed

For some reason it looks like the whole file has been changed, but I actually changed only line 393-401.

comment:6 timbeks18 months ago

  • Keywords has-patch added
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:7 MikeHansenMe18 months ago

  • Cc mdhansen@… added

comment:8 koopersmith18 months ago

  • Owner set to koopersmith
  • Resolution set to fixed
  • Status changed from reopened to closed

In [22140]:

Properly handle inserting full size images. props timbeks, fixes #22124.

comment:9 koopersmith18 months ago

#22032 was marked as a duplicate.

comment:10 koopersmith18 months ago

#22032 was marked as a duplicate.

Note: See TracTickets for help on using tickets.