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

Double inserter button showing at the end of some block lists #28907

Closed
talldan opened this issue Feb 10, 2021 · 4 comments · Fixed by #29920
Closed

Double inserter button showing at the end of some block lists #28907

talldan opened this issue Feb 10, 2021 · 4 comments · Fixed by #29920
Assignees
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@talldan
Copy link
Contributor

talldan commented Feb 10, 2021

Description

In some block lists (like the navigation block) the trailing appender shows as well as a sibling inserter.

This was introduced by #28418. The solution is probably that the insertion point can be displayed after the last block when hovering over blocks in the block library or quick inserter menu. It shouldn't display when there's a trailing appender already.

Step-by-step reproduction instructions

  1. Add a navigation block
  2. Add some menu items
  3. Hover around the trailing edge of the last menu item

Expected behaviour

Only one inserter

Actual behaviour

It's very insertery

Screenshots or screen recording (optional)

ghost-inserter.mp4
@talldan talldan added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Feb 10, 2021
@jom
Copy link

jom commented Mar 10, 2021

This seems to happen [also?] with InnerBlocks that have its own appender.

Screen Shot 2021-03-10 at 7 30 45 pm

@ocean90
Copy link
Member

ocean90 commented Mar 16, 2021

Just noticed the same with a custom block with InnerBlocks which only allows one block via allowedBlocks and uses renderAppender: () => <InnerBlocks.ButtonBlockAppender />. It's also odd that using the additional appender sometimes if not always adds the block to the first position.

@youknowriad Do you have some ideas how we could fix this?

@talldan
Copy link
Contributor Author

talldan commented Mar 17, 2021

#29920 should fix it.

@ocean90
Copy link
Member

ocean90 commented Mar 19, 2021

Added to the WordPress 5.7.x project, would be nice to include the fix in a minor update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants