Skip to content

Commit

Permalink
Let the “Add” menu be shown above the button
Browse files Browse the repository at this point in the history
Fixes #15852
  • Loading branch information
brandonkelly committed Oct 8, 2024
1 parent 75db5bc commit c34549c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Fixed a bug where eager-loading wasn’t working properly when multiple fields had the same handle. ([#15796](https://github.com/craftcms/cms/issues/15796))
- Fixed a bug where where required Full Name fields weren’t getting enforced for users. ([#15808](https://github.com/craftcms/cms/issues/15808))
- Fixed a bug where relation fields weren’t merging uploaded asset IDs with the existing field values. ([#15809](https://github.com/craftcms/cms/issues/15809))
- Fixed a bug where the “Add” menu within field layout designer tabs was always being positioned below the button. ([#15852](https://github.com/craftcms/cms/issues/15852))
- Fixed a missing authorization vulnerability.

## 5.4.6 - 2024-09-27
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions src/web/assets/cp/src/js/FieldLayoutDesigner.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,7 @@ Craft.FieldLayoutDesigner.Tab = Garnish.Base.extend({
const $tabContent = this.$container.children('.fld-tabcontent');
this.$addBtn = $tabContent.children('.fld-add-btn');

const disclosureMenu = this.$addBtn
.disclosureMenu({
position: 'below',
})
.data('disclosureMenu');
const disclosureMenu = this.$addBtn.disclosureMenu().data('disclosureMenu');
disclosureMenu.on('beforeShow', () => {
this.designer.$libraryContainer.appendTo(disclosureMenu.$container);
});
Expand Down

0 comments on commit c34549c

Please sign in to comment.