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

Indentation for table is applied to both the table and its content #2348

Closed
mlewand opened this issue Jul 16, 2019 · 2 comments · Fixed by ckeditor/ckeditor5-indent#15
Closed
Assignees
Labels
package:indent type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@mlewand
Copy link
Contributor

mlewand commented Jul 16, 2019

Is this a bug report or feature request?

🐞 Bug report

💻 Version of CKEditor

CKEditor v5 @ 12.3.1

📋 Steps to reproduce

Currently you're able to indent the table, but it applies the indentation to both the table element and each cell's paragraphs separately.

  1. Open the indent-block manual test.
  2. Insert a 2x2 table.
  3. Fill the cells with some random text.
  4. Select an entire table.
  5. Increase the indentation using toolbar button.

✅ Expected result

One of two:

  • Only the table gets indented.
  • Indentation feature is disabled for tables.

❎ Actual result

Both table and all the cells gets indented.

Markup:

<figure class="table" style="margin-left:40px;">
	<table>
		<tbody>
			<tr>
				<td>

					<p style="margin-left:40px;">aa</p>
				</td>
				<td>

					<p style="margin-left:40px;">bb</p>
				</td>
			</tr>
			<tr>
				<td>

					<p style="margin-left:40px;">cc</p>
				</td>
				<td>

					<p style="margin-left:40px;">dd</p>
				</td>
			</tr>
		</tbody>
	</table>
</figure>
@mlewand mlewand changed the title Indentation for table is applied to both the table and all the cells Indentation for table is applied to both the table and it's content Jul 16, 2019
@jodator
Copy link
Contributor

jodator commented Jul 16, 2019

Looks like the same bug as ckeditor/ckeditor5-indent#8 - the items on which command is executed are not filtered.

@jodator jodator self-assigned this Jul 16, 2019
@jodator
Copy link
Contributor

jodator commented Jul 17, 2019

It's a different block - the command should check isEnabled for a top-most block from the selection.

mlewand referenced this issue in ckeditor/ckeditor5-indent Jul 24, 2019
@Reinmar Reinmar changed the title Indentation for table is applied to both the table and it's content Indentation for table is applied to both the table and its content Aug 21, 2019
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-indent Oct 9, 2019
@mlewand mlewand added this to the iteration 26 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:indent labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:indent type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants