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

[Table block] Insert Row function broken when no body rows are present and header is activated #45526

Open
LukaszJaro opened this issue Nov 3, 2022 · 2 comments
Labels
[Block] Table Affects the Table Block Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended

Comments

@LukaszJaro
Copy link

Description

Discovered in this support forum https://wordpress.org/support/topic/table-block-variation-with-header-section-activated/#post-16161912

"Insert Row" function broken when no body rows are present and header is activated.

Step-by-step reproduction instructions

  1. Insert a Table block
  2. Add a header section and some body rows
  3. Then delete all of the body rows
  4. Then attempt to insert body rows again

Result: greyed out menu items, unable to add rows
Expected: Row to appear after selecting insert row

Screenshots, screen recording, code snippet

No response

Environment info

WP 6.0.3
Chrome
Windows 10
PHP 7.4.28

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@t-hamano t-hamano added the [Block] Table Affects the Table Block label Nov 4, 2022
@jordesign jordesign added [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. labels Aug 1, 2023
@stacimc
Copy link
Contributor

stacimc commented Aug 1, 2023

I was able to test this on GB trunk, although I’m not sure what the intended behavior should be. The Edit Table menu actions are all relative to the currently selected row (eg Insert before, Insert after). After deleting a row, no row is selected anymore and the menu options are all grayed out until you click back into a row. This happens regardless of how many rows are left in the table.

That being said, if you’ve deleted the last body row of a Table, you can only click into the Header row, so you can only add more Header rows. So if you’ve deleted all the body rows from a Table, it does not seem possible to add any body rows back without starting over entirely.

Demo:

delete-table-rows-test.mov
@YukinobuAsakawa
Copy link

I'm curious about this issue.I tried testing it and it looked like this.

When I tried to insert the body line again, I was able to insert it. However, if it was outside the frame, when I tried to insert it, it was grayed out and I could not insert it.

within the limits of
スクリーンショット 2023-11-15 1 44 24

outside the frame
スクリーンショット 2023-11-15 1 44 45

  • Environment tested
  • WordPress Version:6.4.1
  • Gutenberg Version 17.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table Affects the Table Block Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended
5 participants