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

DataViews: A flash occurs when checking an item that cannot be checked #60268

Open
t-hamano opened this issue Mar 28, 2024 · 1 comment
Open
Labels
[Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

Description

On the template list or template parts list page, if any item has been edited, a checkbox will be displayed when you hover over the item. Checkboxes for items that have not yet been edited have the disabled attribute, but when you click the checkbox, it is briefly checked and immediately unchecked.

Step-by-step reproduction instructions

  • Update any theme template or theme template part with any changes.
  • On the list page, hover over a theme template or theme template part that hasn't been edited yet.
  • Click the check box.

Screenshots, screen recording, code snippet

329b31bec694d4f62538aadec87e82ba.mp4

Environment info

Gutenberg version; latest (18.0.0)

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 [Type] Bug An existing feature does not function as intended [Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond labels Mar 28, 2024
@t-hamano
Copy link
Contributor Author

This issue is probably related to what was being discussed in this comment. In other words, I think this is because onChange itself is triggered even if the checkbox is disabled.

Perhaps adding a disabled state to the CheckboxControl component and bypassing onChange itself when the component is disabled, as suggested in #59411, might also solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant