Skip to content
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

Moving image to another cell modifies the target cell #4952

Closed
KarolDawidziuk opened this issue Nov 5, 2021 · 2 comments · Fixed by #4997
Closed

Moving image to another cell modifies the target cell #4952

KarolDawidziuk opened this issue Nov 5, 2021 · 2 comments · Fixed by #4997
Assignees
Labels
plugin:clipboard The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@KarolDawidziuk
Copy link
Contributor

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Open source and paste it:
 <table border="1" cellpadding="1" cellspacing="1" style="width:500px">
	<tbody>
		<tr>
			<td><img alt="" src="https://via.placeholder.com/100" /></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
	</tbody>
</table>
  1. Using drag & drop move the image into another cell.

Expected result

The image was moved properly.

Actual result

Instead of moving the image itself, a new nested table with the image was created in the target.
This problem occurred since 4.7.x version.

This problem won't occur when we add an empty space after the image and without clipboard plugin.

Screen.Recording.mov

Other details

  • Browser: …
  • OS: …
  • CKEditor version: since 4.7.x
  • Installed CKEditor plugins: …
@KarolDawidziuk KarolDawidziuk added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:clipboard The plugin which probably causes the issue. regression This issue is a regression. size:? labels Nov 5, 2021
@KarolDawidziuk KarolDawidziuk self-assigned this Dec 1, 2021
@KarolDawidziuk
Copy link
Contributor Author

First thoughts: It's looking like a problem with extractHtmlFromRange() inside CKEDITOR.plugins.clipboard.internalDrop() method.

Besides, it only occurs on the first try, the next d&d works fine.

@CKEditorBot
Copy link
Collaborator

Closed in #4997

@CKEditorBot CKEditorBot added this to the 4.17.2 milestone Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:clipboard The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants