Opened 10 years ago
Closed 10 years ago
#12172 closed New Feature (fixed)
Integration inline widgets with new drag and drop
Reported by: | Piotr Jasiun | Owned by: | Piotr Jasiun |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.5.0 Beta |
Component: | General | Version: | |
Keywords: | Cc: |
Description (last modified by )
Change History (14)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Status: | new → confirmed |
comment:2 Changed 10 years ago by
Milestone: | → CKEditor 4.5.0 |
---|
comment:3 Changed 10 years ago by
Owner: | set to Piotr Jasiun |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 10 years ago by
Status: | assigned → review |
---|
comment:5 Changed 10 years ago by
Type: | Bug → New Feature |
---|
comment:6 Changed 10 years ago by
Widget tests are modified too, so ticket is ready for full review.
comment:7 Changed 10 years ago by
I rebased branch on the newest version of #12173 and moved changes from benders-ckeditor into ckeditor-dev. Now all changes are in ckeditor t/12172.
comment:10 follow-up: 11 Changed 10 years ago by
Status: | review → review_failed |
---|
I pushed some commits to the branch.
- Undo manager integration broken on Chrome. Drag widget twice. Press CTRL+Z twice. Actual: widget did not return to its original location.
- Undo manager integration broken - drag widget once (don't focus it before). Press CTRL+Z. Caret goes to the beginning of editor (Chrome, FF) or stays at drop position (IEs). Expected: widget should be focused.
- On dragstart widget's downcasted version should be passed to dataTransfer, not its id. If you don't want to work on this right now please report a ticket.
- After the change of clipboardIdDataType tests started failing on IE8 and IE9. I've got 22 failing cases in http://tests.ckeditor.dev:1030/tests/plugins/clipboard/drop. Also there's an outdated code expecting that this value may still equal "URL".
- On IE editor isn't focused after drop from external source.
Now, the only blocker is point 4. Points 1, 2 and 3 can be handled in separate ticket. Point 5 is something that I know we talked about but I don't remember conclusions.
comment:11 Changed 10 years ago by
Status: | review_failed → review |
---|
Replying to Reinmar:
I pushed some commits to the branch.
- Undo manager integration broken on Chrome. Drag widget twice. Press CTRL+Z twice. Actual: widget did not return to its original location.
- Undo manager integration broken - drag widget once (don't focus it before). Press CTRL+Z. Caret goes to the beginning of editor (Chrome, FF) or stays at drop position (IEs). Expected: widget should be focused.
Fixed with widget.focus()
on dragstart.
- On dragstart widget's downcasted version should be passed to dataTransfer, not its id. If you don't want to work on this right now please report a ticket.
I created a separate ticket: #12392.
- After the change of clipboardIdDataType tests started failing on IE8 and IE9. I've got 22 failing cases in http://tests.ckeditor.dev:1030/tests/plugins/clipboard/drop. Also there's an outdated code expecting that this value may still equal "URL".
Tests fixed. Outdated code removed.
- On IE editor isn't focused after drop from external source.
When I checked it editor is focused but cursors is hidden. Anyway I believe this problem is not related not widget drag and drop. I do not think that this problem is worth spending time on it, but if you think so it should be reported in the separate ticket.
comment:12 Changed 10 years ago by
Status: | review → review_failed |
---|
Great. But where's the branch? branch:t/12172 ends with my commits.
comment:14 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | review → closed |
It's ok now - tests pass, no more problems with undo manager. Merged to major with git:2ab5c72.
I found one difference this branch introduced - it's now possible to dnd widgets between editors. This is wrong at this stage, when we move the internal form of widget, but it will be ok as soon as we'll start downcasting it, because downcasted version can be properly filtered and upcasted by the new editor.
This ticket turned out to be good test for the new paste/drop API. The conclusion is that it seems to be possible to handle widgets with this drag and drop implementation and the big part on the code can be removed from widgets plugin or simplified. But also some changes in the drag and drop implementation was needed:
0
and not confused it withfalse
,URL
does not work properly; URL data type does not works in the same strange case that IE use set text on drop (dragging image incontenteditable=false
incontenteditable=true
); we have to useText
data on all IEs,setData
needs to be surrounded by try-catch because Firefox throws exceptions when you try to setData on drop.Some widget tests needs to be modified because of changes, but dev code is ready for review.