Opened 6 years ago
Closed 6 years ago
#45418 closed defect (bug) (reported-upstream)
Admin notices lose custom id and class attributes in Gutenberg editor
Reported by: | ianmjones | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.0 |
Component: | Editor | Keywords: | |
Focuses: | administration | Cc: |
Description
If a plugin creates a custom notice for display in the admin it usually includes an id
and/or class
attributes in the div
that can be used to identify actions on it, such as dismiss.
In the Gutenberg editor admin notices are being displayed with new styling and class attributes different to when displayed in the rest of the WordPress admin dashboard and seem to have the id
and custom class
attributes stripped.
This makes it impossible for a plugin to identify its own notices and attach JavaScript handlers for the dismiss button and therefore properly register that the admin notice is no longer to be displayed.
Change History (2)
#2
@
6 years ago
- Milestone Awaiting Review deleted
- Resolution set to reported-upstream
- Status changed from new to closed
Thank you for the ticket @ianmjones, and for adding it the the Gutenberg repo, @ianmjones.
To avoid duplicating tracking, I'm going to close this ticket, so discussion can be focussed in GB12320.
I've opened GB-12320 for this because this needs to be solved in the Notices package of the new editor.