[wp-trac] [WordPress Trac] #28272: Image loses link after drag and drop or copy/paste

WordPress Trac noreply at wordpress.org
Mon Sep 21 02:07:25 UTC 2015


#28272: Image loses link after drag and drop or copy/paste
--------------------------+-----------------------------
 Reporter:  iseulde       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  TinyMCE       |     Version:
 Severity:  major         |  Resolution:
 Keywords:  dev-feedback  |     Focuses:  javascript
--------------------------+-----------------------------
Changes (by azaozz):

 * keywords:  has-patch needs-testing dev-feedback => dev-feedback


Comment:

 Selecting a different node on `dragstart` will always be problematic as it
 is a bit of a "Catch 22". We need to change the selection '''before''' the
 dragging starts, but the event is fired '''when''' the dragging starts :)

 Imho this will work best as described in [#comment:9 comment:9]:
 - On dragstart check if image is selected, check if it is wrapped in a
 link or caption node, store ref to it.
 - On dragend check if the image was actually moved in the DOM, move the
 previous wrapper to the new location and append the image in it.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28272#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list