Opened 4 years ago

Closed 4 years ago

#13042 closed New Feature (fixed)

Block widget DnD should behave similar to other DnD

Reported by: Piotr Jasiun Owned by: Piotr Jasiun
Priority: Normal Milestone: CKEditor 4.5.0 Beta
Component: General Version: 4.5.0 Beta
Keywords: Cc:

Description

  1. Block widgets DnD should fire paste events.
  2. Block widgets DnD should fire editor.dragstart, editor.dragend and editor.drop events.
  3. Paste event should have additional parameter range so it should be possible to paste between blocks, where we can not set selection.
  4. Some widget DnD clean-up is needed to remove leftovers.

This ticket should fix: #11219 and #12090.

Change History (4)

comment:1 Changed 4 years ago by Piotr Jasiun

Owner: set to Piotr Jasiun
Status: newassigned

comment:2 Changed 4 years ago by Piotr Jasiun

Milestone: CKEditor 4.5.0CKEditor 4.5.0 Beta

comment:3 Changed 4 years ago by Piotr Jasiun

Status: assignedreview

Changes are done and pushed to the t/13042 branch. The most important changes are listed below.

  • Drag and Drop dataTransfer is now always bind for all events since last reset, if there is no native event.
  • Clipboard D&D logic is now moved to the editor.drag|dropstart|dropend events listeners. This means that it is enough to fire these events with proper parameters (target and ranges) to execute drag and drop.
  • Block widgets use editor.drag|dropstart|dropend events.
  • Block and inline widgets now share part of the D&D code.
  • extractHtmlFromRange has now removeEmptyBlock parameter.
  • editor.insertHtml and editable.insertHtml have now the range parameter.
  • widgets use now extractHtmlFromRange instead of outerHtml.

This ticket needed 2 other to be closed: #13069, #13101.

After these changes 2 bugs were introduced, they will be reported as separate tickets:

  • block widget is not focused after undo (#13129),
  • ids are removed (#13128).

These changes should fix: #11219, #12090, #12095.

Last edited 4 years ago by Piotr Jasiun (previous) (diff)

comment:4 Changed 4 years ago by Piotrek Koszuliński

Resolution: fixed
Status: reviewclosed

Closed with git:1b974b7. Hurray!

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy