From 35ab6b4816bd627239de8d8b25ce0c86db8c74b4 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 5 Feb 2024 14:43:22 -0500 Subject: [PATCH] fix(select): popover can be scrolled (#28965) Issue number: resolves #28963 --------- ## What is the current behavior? In https://github.com/ionic-team/ionic-framework/pull/28861 I fixed an issue that caused the wrong content inside of a popover to be scrollable. This CSS should have been applied, but it broke back when popover was converted to the Shadow DOM. Fixing this issue revealed a misconfiguration with the select-popover that caused the select-popover to no longer be scrollable. ## What is the new behavior? - Content inside of `ion-select-popover` can now be scrolled Note that I am considering this a bug fix instead of a regression. While scrolling used to work in select-popover, it only worked by chance. The `.popover-viewport` styles should have always applied to the select-popover, thus requiring the use of `overflow-y: auto` in select-popover. ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information Dev build: `7.7.1-dev.11706893059.1bef4b38` --- .../src/components/select-popover/select-popover.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/components/select-popover/select-popover.scss b/core/src/components/select-popover/select-popover.scss index 3fba7de13ce..c22aa273211 100644 --- a/core/src/components/select-popover/select-popover.scss +++ b/core/src/components/select-popover/select-popover.scss @@ -8,3 +8,14 @@ ion-list-header, ion-label { @include margin(0); } + + +/** + * The main content inside of a popover has overflow: hidden + * so that a descendant ion-content can be scrolled. + * However, select-popover does not use ion-content so we need + * to explicitly make this container scrollable. + */ +:host { + overflow-y: auto; +}