Opened 9 years ago

Closed 9 years ago

#12964 closed Bug (fixed)

editable.extractHtmlFromRange tries to extract range twice from a single table cell

Reported by: Piotrek Koszuliński Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.5.0 Beta
Component: General Version: 4.5.0 Beta
Keywords: Cc:


Bug revealed by #11586.


Inside helpers.table.deleteRanges( that ); 4 ranges are being removed (they are stored in that.tableContentsRange), but two of them are placed in exactly the same spot and other two as well. After the first range of each pair is removed, extraction of the second range on non-IE browsers do nothing (surprisingly) and on IE8-10 it leads to removing nodes outside of the marked table cell. In result of this a bookmark span is removed and hence the error is thrown upon its restoring.

There are two issues here, but only one needs to be fixed. First one is that ranges are duplicated and this is the root of the issue. Second is that range.extractContents() does something weird instead of throwing an error, but we can ignore this.

Change History (4)

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

Status: newconfirmed

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

Owner: set to Piotrek Koszuliński
Status: confirmedassigned

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

Status: assignedreview

Pushed branch:t/12964. First I thought that I'll try to fix walker.guard which was executed too many times, but that ended in #12983 being a dead end.

PS. remember to restart bender once you check out the branch (change in bender.js). PPS. #12987.

comment:4 Changed 9 years ago by Piotr Jasiun

Resolution: fixed
Status: reviewclosed

This seems to be the best solution. Closed with git:fb71fc8.

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