XamarinCommunityToolkit icon indicating copy to clipboard operation
XamarinCommunityToolkit copied to clipboard

[Bug] iOS Popup: Position of Popup is not centered when the orientation of the device changes

Open DavidV1603 opened this issue 3 years ago • 5 comments

Description

If you change the orientation of the iOS device (e.g. from portrait to landscape mode or vice versa), the Popup is not in the center anymore. On Android this works fine. I guess that is, because the position on iOS is set when initializing to the coordinates of the center of the screen, but the coordinates don't change when the orientation changes.

Steps to Reproduce

  1. Open the Samples app and open the Popup sample on an iOS device.
  2. Change the orientation of the device.

Expected Behavior

The popup should still be in the center of the screen.

Actual Behavior

The popup still has the same coordinates, which are not the center of the screen anymore.

Basic Information

  • Version with issue: v1.1.0

DavidV1603 avatar Jun 14 '21 07:06 DavidV1603

We are encountering the same issue in our app.

FlaynGordt avatar Jun 16 '21 08:06 FlaynGordt

I guess in the same area as #1402

jfversluis avatar Jun 16 '21 12:06 jfversluis

We too, is there any chance someone get fixing this annoying bug?

KlaasTroost avatar Nov 30 '21 14:11 KlaasTroost

This appears to still be an issue as of 2.0.2 - any recommendations on a workaround or fix to re-render a popup on rotate Screen Shot 2022-05-31 at 9 50 13 AM Screen Shot 2022-05-31 at 9 50 26 AM ?

madmapper avatar May 31 '22 17:05 madmapper

Bug is still not fixed?

When opening your popup view subscribe to: Application.Current.MainPage.SizeChanged += MainPage_SizeChanged;

Manually trigger the PropertyChanged event with OnPropertyChanged(nameof(VerticalOptions)) in the SizeChanged event. This will force the PopupRenderer to recenter the popup.

DonovanVZ avatar Jun 02 '23 08:06 DonovanVZ