Skip to content

Commit

Permalink
Fixed disclosure positioning bug
Browse files Browse the repository at this point in the history
Fixes part of #15852
  • Loading branch information
brandonkelly committed Oct 8, 2024
1 parent e8e67bf commit 423cafe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fixed a bug where the time zones listed in Date fields weren’t labelled properly based on the selected date. ([#15805](https://github.com/craftcms/cms/issues/15805))
- Fixed an error that could occur if a native element property was attempted to be eager-loaded. ([#15822](https://github.com/craftcms/cms/issues/15822))
- Fixed errors that could occur if a custom source or field condition referenced a custom field whose type had changed. ([#15850](https://github.com/craftcms/cms/issues/15850))
- Fixed a bug where disclosure menus weren’t sticking to their trigger element as it was scrolled, if it was within a slideout or other inline-scrollable container. ([#15852](https://github.com/craftcms/cms/issues/15852))
- Fixed a missing authorization vulnerability.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/web/assets/garnish/src/DisclosureMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ export default Base.extend(
'scroll',
'setContainerPosition'
);
const $scrollParent = this.$trigger.scrollParent();
if ($scrollParent.get(0) !== document.body) {
this.addListener($scrollParent, 'scroll', 'setContainerPosition');
}
this.addListener(Garnish.$win, 'resize', 'setContainerPosition');

this.$container.velocity('stop');
Expand Down

0 comments on commit 423cafe

Please sign in to comment.