Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Popup Not Centering on First Attempt

Hi,

I have a popup that is launched when I swipe right on an object. The "position to" is set to window. When I launch the popup the very first time upon visiting the page the popup is off to the lower right cover of the screen. Every other time after that I launch the popup, it is properly centered in the screen. See screenshot below.

How can I correct this to center to the screen every time, even the first time.

Thanks

Image

Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Popup Not Centering on First Attempt

Hello Marco,

Could you please clarify do you use any CSS rules for centering it?

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Popup Not Centering on First Attempt

I am not using any CSS on this Popup.

I thought the "postion to" = "window" was supossed to center it.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Popup Not Centering on First Attempt

Marco,

Please try to set its position forcibly via CSS: https://devcenter.appery.io/documenta...

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Popup Not Centering on First Attempt

I tried but it does not seem to help.

Just to ensure I am using the correct code, I used the following:

Appery("ViewAllPrevious").css('margin', 'auto');
Appery("ViewAllPrevious").css('display', 'block');

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Popup Not Centering on First Attempt

Hi Marco,

Please give us your app public link and describe steps to reproduce this problem in your app.(open popup).

Thanks.

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Popup Not Centering on First Attempt

Hey Yurii,

My app is already shared with appery support titled "17weeks". You can login with the username "test" and password "test" and then click the "view all picks" button in the bottom right corner of the nav bar. When on that screen you can swipe right on any of the team names to open the popup.

Thanks

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Popup Not Centering on First Attempt

Hi Marko,

Problem you have is in dynamic content that will change popup(size) after you show it.

So you need change order to:

1 Populate popup with dynamic data.

2 Open popup.

Currently you open popup and then update content.

Regards.

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Popup Not Centering on First Attempt

Hi Yurii,

You were absolutely right.

This worked perfectly to resolve my issue!!

Thanks so much!

Return to “Issues”