Opened 9 years ago

Last modified 9 years ago

#13287 confirmed Bug

bug with table content drag-and-drop - removes the cells

Reported by: slaviktim Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.0 Beta
Keywords: Cc:

Description

Used both on-site installation and demo here Steps to review the bug:

  1. create new table using ckeditor (usual base 3 rows 2 columns)
  2. add any content to the cells.
  3. try to D&D the content -doesn't matter if it's any of text or image - from cell to cell

You'll see that these actions make the table cells disappeared.

Versions checked: from 4.4.7 placed as demo and lower

Change History (9)

comment:1 Changed 9 years ago by Jakub Ś

Problem can be observed in Firefox.

CKEditor doesn't support D&D of native tables.

It is true that when you D&D table from one place to another:

  • till CKEditor 4.4.7 table is copied to new place but source table is left empty.
  • in CKEditor 4.5. beta only first cell is copied.
  • in native Firefox only "contents of table are copied". To be more precise it only looks like this. In reality rows (tr's) are copied pasted into target element.

Taking the above into account I think that the only way to fix this is implementing tables as Widgets (and we have that reported already). Before closing this ticket I would like to consult @Reinmar first.

comment:2 Changed 9 years ago by slaviktim

I've used Firefox, Chrome and IE11 to check this bug. Mostly I've used Chrome, so not only native Firefox may be used.

comment:3 Changed 9 years ago by Piotrek Koszuliński

There's no sense to talk about 4.4.7 right now, because starting from 4.5.0 the whole native handling was replaced by our custom one.

As for 4.5.0, we did a shortcut and implemented support only for copying/cutting/dragging the first range of a selection, because only on Firefox and only in tables there are multi-range selections. Proper handling for them would take few weeks (if not months) which we didn't have, so for now it was postponed. But it's fully doable. It's just a huge amount of work to handle first copying and extracting such ranges and then their insertion.

One more thing - right now pasting/dropping part of a table inside another table cell creates a new table (with that specific content) inside the first table. This is intentional because logic of merging pasted/dropped table structure into existing table structure is even harder than multi-range selections. There are bazilion of cases to handle and hence this was also postponed. Some level of support is possible, but I don't know if we'll ever work on it. Such complex feature would require some kind of sponsorship I think.

comment:4 Changed 9 years ago by slaviktim

So, this thing will stay the same, right? Or your conclusion is to replace every packs lower 4.5 with 4.5 build?

comment:5 Changed 9 years ago by Piotrek Koszuliński

Just to clarify - changes that we've done in CKEditor 4.5.0 completely overridden native behaviour.

I can see that on 4.4.7 on Chrome D&D of some cells selected will indeed remove them from their original location and a new table will be dropped in the drop location. I also saw some other weird things and I guess that on other browsers different things will happen.

On 4.5.0 on every browser D&D does not remove selected cells. We decided to implement editor.extractHtmlFromRange() in a way that only content of table cells is extracted, but table structure is not affected. We believe that this is far better behaviour than what you can observe on 4.4.7 on Chrome.

comment:6 Changed 9 years ago by Piotrek Koszuliński

If you want to check CKEditor 4.5.0 Beta see http://ckeditor.com/blog/CKEditor-4.5-Beta-Released (there are samples where you can test it). There's no fully stable release yet, so you won't be able to build CKEditor 4.5.0 now. You would need to clone github.com/ckeditor/ckeditor-dev and check out the major branch.

comment:7 Changed 9 years ago by slaviktim

Well - that's really good news. Thank you for detailed description for this current problem. So changing version will prevent this one bug to appear. Will wait for this build release to get stable. Also will check the major branch and if anything let you know.

comment:8 Changed 9 years ago by Jakub Ś

Status: newconfirmed
Version: 4.4.74.5.0 Beta

here's no sense to talk about 4.4.7 right now, because starting from 4.5.0 the whole native handling was replaced by our custom one.

I'm confirming this issue and setting version 4.5.0 beta. Thanks @Reinmar.

comment:9 Changed 9 years ago by slaviktim

Thank you Reinmar. Looking forward to 4.5

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy