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

Still able to select block when block is set to disabled with useBlockEditingMode #57227

Closed
dernin opened this issue Dec 19, 2023 · 3 comments · Fixed by #58971
Closed

Still able to select block when block is set to disabled with useBlockEditingMode #57227

dernin opened this issue Dec 19, 2023 · 3 comments · Fixed by #58971
Assignees
Labels
[Feature] Block API API that allows to express the block paradigm. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@dernin
Copy link

dernin commented Dec 19, 2023

Description

Bug: When a block is set to disabled using setBlockEditingMode, it stops a user from being able to select that block either directly by clicking on it or by selecting it in the block list view, however we discovered that a user is still able to select the disabled block by clicking in the space directly above the block before the block inserter. useBlockEditingMode does not appear to take this method of selecting blocks in to account (if that is a valid method of selecting blocks).
Related to #52094

Step-by-step reproduction instructions

  1. Add two blocks to a page.
  2. Disable the second block using the setBlockEditingMode method.
  3. Confirm that it is disabled by attempting to select it.
  4. Hover the mouse cursor just above the block so that the blue block inserter line and button appear.
  5. Click anywhere between the second block and the first block except for the blue line and insert button. This must be in the center within the bounds of the blue line, not to the left or right of it.
  6. The second block should now be selected and editable.

Screenshots, screen recording, code snippet

image

Environment info

WordPress 6.4.2.
The Gutenberg plugin is not installed.

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

@dernin dernin added the [Type] Bug An existing feature does not function as intended label Dec 19, 2023
@jordesign jordesign added [Feature] Block API API that allows to express the block paradigm. Needs Testing Needs further testing to be confirmed. labels Dec 19, 2023
Copy link

Hi,
This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jan 19, 2024
@Mamaduka Mamaduka removed the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jan 31, 2024
@Mamaduka
Copy link
Member

Mamaduka commented Feb 1, 2024

I can confirm the issue.

@noisysocks, any thoughts on why this might be happening?

Screencast

CleanShot.2024-02-01.at.10.08.53.mp4
@Mamaduka Mamaduka removed the Needs Testing Needs further testing to be confirmed. label Feb 1, 2024
@noisysocks
Copy link
Member

Huh weird. What's the target of the click event?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
4 participants