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

Forward slash inserter doesn't work in the widgets editor #33099

Closed
draganescu opened this issue Jun 30, 2021 · 2 comments · Fixed by #33161
Closed

Forward slash inserter doesn't work in the widgets editor #33099

draganescu opened this issue Jun 30, 2021 · 2 comments · Fixed by #33161
Assignees
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Regression Related to a regression in the latest release

Comments

@draganescu
Copy link
Contributor

When using the forward slash inserter in the new Widgets editor nothing happens.

To reproduce

  1. Use the latest WordPress 5.9 RC
  2. Go to Appearance > Widgets
  3. Add a paragraph block
  4. Type "/"
  5. Observe nothing happens

Screenshots

slash-inserter.mp4

Expected behavior

The slash inserter should behave like the one in the post editor, triggering the quick insert popover menu.

@draganescu draganescu 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 [Feature] Widgets Screen The block-based screen that replaced widgets.php. Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Jun 30, 2021
@noisysocks noisysocks removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jul 1, 2021
@talldan talldan added [Type] Regression Related to a regression in the latest release and removed [Type] Bug An existing feature does not function as intended labels Jul 1, 2021
@tellthemachines tellthemachines self-assigned this Jul 1, 2021
@tellthemachines
Copy link
Contributor

I can only reproduce this when starting from an empty widget area and typing consecutive paragraphs. Interestingly enough, as soon as I hover over the widget area, causing the in-between inserter to appear, the autocomplete box shows up.

@tellthemachines
Copy link
Contributor

tellthemachines commented Jul 2, 2021

So this is happening because at the point the popover menu tries to render, the list of valid blocks for insertion is empty, because templateLock is set to all (the filter is returning false here). I don't know why that's the case though, as we're setting templateLock to false in the widget area inner block props.

To make things worse, it doesn't happen every single time. It only happens when adding blocks to an empty widget area, but maybe one time out of ten it works as expected 😖

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 [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants