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 )
- http://tests.ckeditor.dev:1030/tests/plugins/clipboard/manual/draganddrop
- DnD inline image in the inline editor (sometimes works also in the classic one).
- Undo.
Error is thrown:
'null' is null or not an object
inside range.setStartBefore()
.
Change History (8)
comment:1 Changed 10 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 10 years ago by
Owner: | set to Artur Delura |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 10 years ago by
Priority: | Normal → High |
---|
comment:5 Changed 10 years ago by
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
Status: | assigned → review |
---|
comment:7 Changed 10 years ago by
Status: | review → review_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
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on major with git:7dd063e.
I've been also able to reproduce it in the classic editor.