-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow basic d&d element/image in tables when tableselection is on #4951
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and clean solution 👍 I hope that disabling selection do not break anything ;) However all tests on chrome all green 🤞
I left a few inline comments. The most important is the one with d&d issue on chrome.
I think we could also add a mixed test, so d&d for mixed images with text content.
Also, please use the 4.17.1
tag as @jacekbogdanski suggested.
<table border="1" cellpadding="1" cellspacing="1" style="width:500px"> | ||
<tbody> | ||
<tr> | ||
<td><img alt="" src="https://via.placeholder.com/100" /> </td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this  
? Because without it - when I d&d image - it is pasted with additional borders 🤔
If you leave it, then it is possible to d&d image inside the same cell, but after  
. Then when you d&d image to another cell it is copied with additional borders. It looks like it is copied with the entire table
construction inside the td
element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, it occurs only in chrome... 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you said, without
d&d is breaking. I created a separate issue for this case. This problem occurs when tableselection
and clipboard
plugins are enabled.
Rebased on newest |
Rebased on newest |
95eb1c8
to
9a148d2
Compare
Thanks, @sculpt0r for the review! Changes:
|
Rebased on newest mater. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the latest corrections and extracting the issue 👍 Besides it: the solution looks good 🎉 We just earned a feature 👏
I only changed the tags to 4.17.2
since the latest release already is 4.17.1
What is the purpose of this pull request?
Bug fix
Does your PR contain necessary tests?
All patches that change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.
This PR contains
Did you follow the CKEditor 4 code style guide?
Your code should follow the guidelines from the CKEditor 4 code style guide which helps keep the entire codebase consistent.
What is the proposed changelog entry for this pull request?
What changes did you make?
D&D in tables was unavailable because the
drag
event handler cancel this event.To allow it I just removed the part of the code responsible for the interrupting of the event and in the same handler updated the
fakeSelection.active
flag to stop table selection.This fix only allows moving only selected text and images. Trying to select an entire cell with
tableselection
and moving it fails.PS. This branch has this name because there is already one frozen PR for this issue.
Which issues does your PR resolve?
Closes #547.