Overrides custom class names added via editor.BlockListBlock
hook
#61
Labels
Bug
Something isn't working, looks like a 🐛.
editor.BlockListBlock
hook
#61
Description
Custom class names that get added to the
BlockList
element via theeditor.BlockListBlock
hook get overwritten by custom classnames from Block Visibility Plugin.block-visibility/src/editor/contextual-indicators/index.js
Lines 164 to 186 in 99cc33d
I believe this could be fixed by doing the following:
Here is an example of how it is done in core: https://github.com/WordPress/gutenberg/blob/70ba9218ae53e31d2c26689eed2e698dcea7f3aa/packages/block-editor/src/hooks/layout.js#L457-L460
Step-by-step reproduction instructions
Add another sample plugin that tries to filter
editor.BlockListBlock
and adds a custom class name to the element. See that this class doesn't get added when the Block Visibility Plugin is enabled.Expected behavior
The custom classNames added in the filter get added
Actual behavior
Only the classes from Block Visibility get added. It overrides custom classes added by other filters
Screenshots or screen recording (optional)
System information
The text was updated successfully, but these errors were encountered: