ionic-team / ionic-team/ionic-framework

bug: popover position does not update when viewport is resized or rotated

Offen
#25,023 4 Kommentare 6 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
package: core type: bug
Vorherrschende Sprache
TypeScript
Sterne
52.7k
Forks
13.3k
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
51

Beschreibung

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

- [X] v4.x
- [X] v5.x
- [X] v6.x

### Current Behavior

Same issue as described in https://github.com/ionic-team/ionic-framework/issues/10139 which was not resolved. After resize or screen orientation change, the popover can be misplaced or even be outside of the visible area.

This could also be triggered if there is a layout shift. For example if the popover has no backdrop and the user toggles the ion-split-pane.

### Expected Behavior

Popoverer gets moved when resized or the screen orientation changes. If this is too complicated at least close the popover on resize.

### Steps to Reproduce

Run the example from the [docs](https://github.com/ionic-team/ionic-docs/blob/main/static/demos/api/popover/index.html) with chrome and check the behavior on resize.

### Code Reproduction URL

https://raw.githubusercontent.com/ionic-team/ionic-docs/main/static/demos/api/popover/index.html

### Ionic Info

Ionic:

Ionic CLI : 6.19.0 (/home/wolf/.config/yarn/global/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.13
@angular-devkit/build-angular : 13.3.0
@angular-devkit/schematics : 13.3.0
@angular/cli : 13.3.0
@ionic/angular-toolkit : 6.1.0

Capacitor:

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

Utility:

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

System:

NodeJS : v14.19.1 (/usr/bin/node)
npm : 6.14.16
OS : Linux 5.13

### Additional Information

I tired to implement the "close popover on resize" behavior with a ResizeObserver, but had trouble when using a ion-select with popover interface. There seems to be no way to close that popover programmatically.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.