Skip to content

Commit

Permalink
fixes #2001 (#2007)
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed May 10, 2024
1 parent d94acc6 commit d478ccb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/pages/resources/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
- Fixed a bug in `<sl-button-group>` classes [#1974]
- Fixed a bug in `<sl-textarea>` that may throw errors on `disconnectedCallback` in test environments [#1985]
- Fixed a bug in `<sl-color-picker>` that would log a non-passive event listener warning [#2005]
- Fixed a bug in the submenu controller that allowed submenus to go offscreen and not be scrollable [#2001]

## 2.15.0

Expand Down
5 changes: 5 additions & 0 deletions src/components/menu-item/menu-item.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,9 @@ export default css`
outline-offset: -1px;
}
}
::slotted(sl-menu) {
max-width: var(--auto-size-available-width) !important;
max-height: var(--auto-size-available-height) !important;
}
`;
2 changes: 2 additions & 0 deletions src/components/menu-item/submenu-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ export class SubmenuController implements ReactiveController {
flip-fallback-strategy="best-fit"
skidding="${this.skidding}"
strategy="fixed"
auto-size="vertical"
auto-size-padding="10"
>
<slot name="submenu"></slot>
</sl-popup>
Expand Down

0 comments on commit d478ccb

Please sign in to comment.