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

On nested Heading blocks, the "Change heading level" button loses padding when clicked #22683

Closed
ZebulanStanphill opened this issue May 27, 2020 · 4 comments
Labels
[Block] Heading Affects the Headings Block [Package] Block library /packages/block-library [Type] Regression Related to a regression in the latest release

Comments

@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented May 27, 2020

The issue

When you click the heading level button in a Heading block toolbar, some of its left spacing disappears for some reason. But this only happens when the Heading block is nested in another block.
image

(Ignore the mover placement in the screenshot; I took the picture on another branch, but I tested to make sure the bug was in master.)

I think this regressed due to changes in #20246. The cause appears to be due to a style rule being applied when this <span> is created upon clicking the button:
image

How to reproduce

  1. Insert a Group block.
  2. In that block, insert a Heading block.
  3. Click the "Change heading level" button.
  4. Notice how the padding on the left side of the button shrinks.
@ZebulanStanphill ZebulanStanphill added [Type] Regression Related to a regression in the latest release [Package] Block library /packages/block-library [Block] Heading Affects the Headings Block labels May 27, 2020
@ZebulanStanphill
Copy link
Member Author

Something else I just noticed is that the "Change heading level" button label tooltip doesn't appear when the block is nested. Possibly related?

@ZebulanStanphill
Copy link
Member Author

Reopening because this was accidentally closed instead of #22863. 😆

@ntsekouras
Copy link
Contributor

Notice how the padding on the left side of the button shrinks.

Hey @ZebulanStanphill, it seems that this has been fixed and the button takes these styles, introduced in this PR #21252.

Can you please verify it's okay now?

@ZebulanStanphill
Copy link
Member Author

@ntsekouras It was still broken when #21252 was merged (this issue wasn't even open yet back then), but something has changed since then and everything seems to be working now! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Package] Block library /packages/block-library [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

No branches or pull requests

2 participants