Opened 10 years ago

Closed 10 years ago

#13280 closed Bug (fixed)

[IE8] Undo after inline widget DnD throws an error

Reported by: Piotrek Koszuliński Owned by: Artur Delura
Priority: Must have (possibly next milestone) Milestone: CKEditor 4.5.0
Component: General Version: 4.5.0 Beta
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

  1. http://tests.ckeditor.dev:1030/tests/plugins/clipboard/manual/draganddrop
  2. DnD inline image in the inline editor (sometimes works also in the classic one).
  3. Undo.

Error is thrown:

'null' is null or not an object

inside range.setStartBefore().

Change History (8)

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

Status: newconfirmed

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

Description: modified (diff)

I've been also able to reproduce it in the classic editor.

comment:3 Changed 10 years ago by Artur Delura

Owner: set to Artur Delura
Status: confirmedassigned

comment:4 Changed 10 years ago by Artur Delura

Priority: NormalHigh

comment:5 Changed 10 years ago by Artur Delura

The problem was caused becuase creating a snapshot behave slightly diffrent on IE8. In addition to that it was not handled properly in our code. Changes in branch:t/13280.

comment:6 Changed 10 years ago by Artur Delura

Status: assignedreview

comment:7 Changed 10 years ago by Piotrek Koszuliński

Status: reviewreview_passed

To make it clear - this patch fixes only the error that was thrown, not the real cause of the issue. While debugging we realised few things:

  • That the check inside selection.selectBookmarks() is invalid, because it was meant to prevent error being thrown when for some reasons fake selection could not be restored and clearly it didn't work because the error was thrown.
  • That this issue is reproducible only in one specific scenario - when dropping inline widget in the same text node that preceded it. Dropping after it or in other elements does not cause an issue.

Plus, debugging undo manager's snapshots is always a huge pain.

Therefore, we decided to fix the incorrect code in selectBookmarks() so an error isn't thrown any more. The issue still exists, because wrong selection is restored after undo, but it has a very limited impact (IE8 only and only this specific case).

comment:8 Changed 10 years ago by Piotrek Koszuliński

Resolution: fixed
Status: review_passedclosed

Fixed on major with git:7dd063e.

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