Skip to content

bug: Popover cut off (off screen). #25349

@infacto

Description

@infacto

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

The popover cut off on top of the screen.

Expected Behavior

Popover should never cut off. It should be scrollable instead of going into off screen.

Steps to Reproduce

Just open a popover. But It depends on the position of the button / item and its height, screen height etc.

See demo on code pen:
https://codepen.io/infacto/pen/KKQyMje
demo

I think it's because the event target height. E.g. the button or item. This is probably not included in the calculation of the position.
You can try it. Just reduce the size of the follow element (codepen demo).

My current workaround is to use another interface for e.g. ion-select. Any idea?

Code Reproduction URL

No response

Ionic Info

See codepen. We currently work on Ionic 5. But it also appears on Ionic 6.

Ionic:

   Ionic CLI                     : 6.16.1 (AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 6.1.6
   @angular-devkit/build-angular : 13.2.6
   @angular-devkit/schematics    : 13.2.6
   @angular/cli                  : 13.2.6
   @ionic/angular-toolkit        : 6.1.0

Utility:

   cordova-res : 0.15.1
   native-run  : 1.2.2

System:

   NodeJS : v14.19.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.16
   OS     : Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions