Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#29733 closed defect (bug) (duplicate)

Unable to insert image using drag-and-drop on custom wp_editor

Reported by: aduth's profile aduth Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Editor Keywords: has-patch dev-feedback
Focuses: javascript Cc:

Description

Steps to reproduce:

1) Create a page with an instance of wp_editor using a non-standard ID (i.e. anything other than "content")
2) When viewing the page, drag and drop an image into editor (on fresh page reload, not having opened media library prior to dragging)
3) Click "Insert into post"

Expected outcome:

Uploaded image is inserted into post

Actual outcome:

Uploaded image is not inserted into post

Cause:

The "drop" event handler creates a new "workflow" instance if one does not already exist using a hard-coded "content" ID despite the custom ID being used.

Attachments (1)

drag-drop-custom-editor-fix.diff (495 bytes) - added by aduth 9 years ago.
Resolution

Download all attachments as: .zip

Change History (4)

@aduth
9 years ago

Resolution

#1 @johnbillion
9 years ago

  • Component changed from Media to Editor
  • Keywords has-patch needs-testing added
  • Version changed from trunk to 4.0

#2 @valendesigns
9 years ago

  • Keywords dev-feedback added; needs-testing removed

I've tested patch drag-drop-custom-editor-fix.diff against trunk and it does solve the issue. To verify I created a post with a non standard wp_editor() and attempted to add an image via drag and drop. That image was inserted into the content after clicking "Insert into post" instead of my custom editor. After applying the patch the image was correctly inserted into the non standard editor. Problem solved.

Cheers,
Derek

#3 @iseulde
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #32527.

Sorry that we didn't address this problem when it was first reported.

Note: See TracTickets for help on using tickets.