Opened 10 years ago
Closed 9 years ago
#13472 closed Bug (fixed)
[IE9-11] Dropped content is often inserted at selection position from before DnD
Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | CKEditor 4.5.0 |
Component: | General | Version: | 4.5.0 |
Keywords: | Cc: |
Description (last modified by )
Reproducible on http://tests.ckeditor.dev:1030/tests/plugins/clipboard/manual/draganddrop when dropping from outside of the editors. First DnD works, but second no - content is inserted in the wrong place (previous selection position).
Change History (16)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Milestone: | CKEditor 4.5.1 → CKEditor 4.5.0 |
Summary: | Unspecified Error thrown on IE9-11 in drag and drop sample in SDK → [IE9-11] Dropped content often inserted at selection position from before DnD |
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
I pushed branch:t/13472. The fix is pretty simple - we stop using existing selection. Instead, we use the tricky mechanism that we created for IE8. From my tests I can see that it's much better. It does not work in some specific cases, as we know, but it does not fail when dropping from outside the editor. I'm worried only that we'll be now using it for all kinds of DnD, and the previous method worked better for internal DnD. So alternative patch may be to check data source.
comment:4 Changed 10 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | new → review |
I pushed branch:t/13472b with what I think is a better fix. I noticed that focus is force in the editor and this cause automatic restoring of a previous selection. The fix was to remove that line, but then it turned out that external DnD does not work on IE8. So I moved the editor.focus()
call to the method that we use on IE8.
comment:5 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Summary: | [IE9-11] Dropped content often inserted at selection position from before DnD → [IE9-11] Dropped content is often inserted at selection position from before DnD |
comment:6 Changed 10 years ago by
Status: | review → review_failed |
---|
Another case:
- select a widget inside editor,
- try DnD a link into this editor, but with only single mousedown (it means - do not select it before DnD - just drag it).
It totally fails (error is thrown). The reason is that getRangeAtDropPosition returns a range inside the fake selection container.
comment:7 Changed 10 years ago by
Status: | review_failed → review |
---|
Pushed more commits to branch:t/13472b. Back to my previous idea that if editor is not focused then it's better to use the second mechanism.
comment:8 Changed 10 years ago by
IE11: Passed
IE10:
- Classic editor: content is pasted always in first
<h1>
element (After phrase "Apollo 11"). - Inline editor: works like before fix. It almost seems like the cache problem but I checked and new sources are linked
- Dragging link with widget focused does not throw error (still problems descripted above apply)
I will now test IE9 and IE8.
comment:9 Changed 10 years ago by
IE9: Dragging link with widget focused into editor's editabgle is impossible, however you can still drag into widget's editable and it works.
*Note*: DnD on IE9 and IE10 works only with console open: probably because of console.logs in those tests.
comment:10 Changed 10 years ago by
Status: | review → review_failed |
---|
comment:11 Changed 9 years ago by
Edit: there is a bit more to link dragging. Even when editor's editable is focused I can't drop link into it.
Link dragging is not supported until IE10. It is a native thing. And about the crashes... nothing we can do.
Note: DnD on IE8-IE10 works only with console open: probably because of console.log()s in those tests.
Yes - and you should never test with the console closed :P
Classic editor: content is pasted always in first <h1> element (After phrase "Apollo 11").
Inline editor: works like before fix. It almost seems like the cache problem but I checked and new sources are linked
Dragging link with widget focused does not throw error (still problems descripted above apply)
I cannot reproduce these issues... And I don't understand what the second point mean.
comment:12 Changed 9 years ago by
Inline editor: fix haven't changed anything - content is dropped at the first drop position (or rather at the position of last known selection/caret position).
comment:14 Changed 9 years ago by
IE10: Classic editor: content is pasted always in first <h1> element (After phrase "Apollo 11")
Turned out this works fine in some IE10 versions, but fails in some other ones. Still, the patch seems to fix IE9 and IE11 (and some IE10 versions), so taking into account that the problem with IE10 is only with external paste, it would be worth including.
comment:15 Changed 9 years ago by
After the investigation we found out that that fix does not work only on some of the IE 10 versions (10.0.9200.16736) and is fine on others. Also the situation is better on IE 9 and IE 11 then it was before. Because the fix touch only external drops which were bad anyway it should not break anything. We decided to close it and include in version 4.5.0.
comment:16 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | review_failed → closed |
I raised priority of this ticket because this bug is very visible in the dnd sample in SDK.