Skip to content

Commit

Permalink
Merge pull request #14911 from craftcms/bugfix/cms-14510-nested-eleme…
Browse files Browse the repository at this point in the history
…nts-js-violation

Fix nested elements js violation
  • Loading branch information
brandonkelly authored May 1, 2024
2 parents 3597752 + e5ec60c commit f479fc3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Craft CMS 4

## Unreleased

- Fixed a bug where disclosure menus weren’t releasing their `scroll` and `resize` event listeners on hide. ([#14911](https://github.com/craftcms/cms/pull/14911]), [#14510](https://github.com/craftcms/cms/issues/14510))

## 4.9.0 - 2024-04-30

### Content Management
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.

2 changes: 2 additions & 0 deletions src/web/assets/garnish/src/DisclosureMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ export default Base.extend(
}

this.trigger('hide');
this.removeListener(Garnish.$scrollContainer, 'scroll');
this.removeListener(Garnish.$win, 'resize');
Garnish.uiLayerManager.removeLayer();
},

Expand Down

0 comments on commit f479fc3

Please sign in to comment.