Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Fixed a bug where newly-selected elements weren’t being rendered correctly for relational fields set to the “Card grid” view mode. ([#18362](https://github.com/craftcms/cms/issues/18362))
- Fixed a bug where card previews weren’t getting updated when a selected field was removed from the field layout.
- Fixed potential JavaScript errors that could occur if a disclosure menu’s trigger or target elements were missing. ([#18358](https://github.com/craftcms/cms/issues/18358))
- Fixed a JavaScript error that occurred if a Matrix field’s label was hidden. ([#18366](https://github.com/craftcms/cms/issues/18366))
- Fixed an infinite recursion bug. ([#18363](https://github.com/craftcms/cms/issues/18363))

## 5.9.5 - 2026-01-31
Expand Down
10 changes: 5 additions & 5 deletions src/fields/Matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ private function blockViewActionMenuItems(): array

setTimeout(() => {
const disclosureMenu = menu.data('disclosureMenu');
disclosureMenu.on('show', () => {
disclosureMenu?.on('show', () => {
let blocks = getBlocks();
let expandLabel, collapseLabel;
if (blocks.is('.sel')) {
Expand Down Expand Up @@ -1030,7 +1030,7 @@ private function copyAction(string $type, string $entrySelector): array

if (!field.length) {
setTimeout(() => {
menu.data('disclosureMenu').removeItem(btn[0]);
menu.data('disclosureMenu')?.removeItem(btn[0]);
}, 1);
return;
}
Expand All @@ -1057,7 +1057,7 @@ private function copyAction(string $type, string $entrySelector): array

setTimeout(() => {
const disclosureMenu = menu.data('disclosureMenu');
disclosureMenu.on('show', () => {
disclosureMenu?.on('show', () => {
const entries = getEntries();
let copyLabel;
if ($(entries).is('.sel')) {
Expand Down Expand Up @@ -1134,7 +1134,7 @@ private function bulkAction(string $entrySelector, string $activateJs, array $it

if (!field.length) {
setTimeout(() => {
menu.data('disclosureMenu').removeItem(btn[0]);
menu.data('disclosureMenu')?.removeItem(btn[0]);
}, 1);
return;
}
Expand All @@ -1147,7 +1147,7 @@ private function bulkAction(string $entrySelector, string $activateJs, array $it

setTimeout(() => {
const disclosureMenu = menu.data('disclosureMenu');
disclosureMenu.on('show', () => {
disclosureMenu?.on('show', () => {
disclosureMenu.toggleItem(btn[0], !!getEntries().length);
});
}, 1);
Expand Down