Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: popover from select not scrollable #28963

Closed
3 tasks done
moose4lord opened this issue Feb 2, 2024 · 4 comments · Fixed by #28965
Closed
3 tasks done

bug: popover from select not scrollable #28963

moose4lord opened this issue Feb 2, 2024 · 4 comments · Fixed by #28965
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@moose4lord
Copy link

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When an IonSelect is presented with a long list of options and interface is set to "popover", then only a partial list of the options is shown with no scroll bar. If interface is set to "alert" or "action-sheet", the scroll bar is shown and the component works properly.

Expected Behavior

When interface="popover" and the list of select options is long, a scroll bar should be visible.

Steps to Reproduce

Just create an IonSelect with interface="popover" and lots of options.

  <ion-select label="Fruits" placeholder="Select fruit" interface="popover">
    <ion-select-option value="apples">Apples</ion-select-option>
    <ion-select-option value="oranges">Oranges</ion-select-option>
    <ion-select-option value="bananas">Bananas</ion-select-option>
    <ion-select-option value="bananas3">Bananas3</ion-select-option>
    <ion-select-option value="bananas4">Bananas4</ion-select-option>
    <ion-select-option value="bananas5">Bananas5</ion-select-option>
    <ion-select-option value="bananas6">Bananas6</ion-select-option>
    <ion-select-option value="bananas7">Bananas7</ion-select-option>
    <ion-select-option value="bananas8">Bananas8</ion-select-option>
    <ion-select-option value="bananas9">Bananas9</ion-select-option>
    <ion-select-option value="bananas10">Banana10</ion-select-option>
    <ion-select-option value="bananas11">Bananas11</ion-select-option>
    <ion-select-option value="bananas12">Bananas12</ion-select-option>
    <ion-select-option value="bananas13">Bananas13</ion-select-option>
    <ion-select-option value="bananas14">Bananas14</ion-select-option>
    <ion-select-option value="bananas15">Bananas15</ion-select-option>
    <ion-select-option value="bananas16">Bananas16</ion-select-option>
    <ion-select-option value="bananas17">Bananas17</ion-select-option>
    <ion-select-option value="bananas18">Bananas18</ion-select-option>
    <ion-select-option value="bananas19">Bananas19</ion-select-option>
    <ion-select-option value="bananas20">Bananas20</ion-select-option>
  </ion-select>

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.6.6
@angular-devkit/build-angular : 17.1.1
@angular-devkit/schematics : 17.1.1
@angular/cli : 17.1.1
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : 5.6.0
@capacitor/android : 5.6.0
@capacitor/core : 5.6.0
@capacitor/ios : 5.6.0

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.11.0 (/usr/local/bin/node)
npm : 10.2.4
OS : macOS Unknown

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Feb 2, 2024
@liamdebeasi liamdebeasi changed the title bug: IonSelect does not show scroll bar when interface="popover" bug: popover from select not scrollable Feb 2, 2024
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Feb 2, 2024
@ionitron-bot ionitron-bot bot removed triage labels Feb 2, 2024
@liamdebeasi
Copy link
Contributor

Thanks, I can reproduce this. Here is a dev build with a proposed fix if you are interested in testing:

npm install @ionic/[email protected]

@moose4lord
Copy link
Author

Wow, your fix worked great. Thanks for being so responsive.

@liamdebeasi liamdebeasi removed their assignment Feb 2, 2024
github-merge-queue bot pushed a commit that referenced this issue Feb 5, 2024
Issue number: resolves #28963

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

In #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?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- 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

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build: `7.7.1-dev.11706893059.1bef4b38`
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #28965, and a fix will be available in an upcoming release of Ionic Framework.

Copy link

ionitron-bot bot commented Mar 6, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants