Select to view content in your preferred language

Popup in JSAPI 4.0 slightly shifts position when window is maximized

1652
2
Jump to solution
08-18-2016 05:20 AM
DavidNascimento
Deactivated User

We are using JSAPI 4.0 in our web application to display, amongst others, feature layers. We have set a PopupTemplate on the layers and upon clicking on the feature, the popup pops up as expected. However, if the browser window is maximized (or a maximized window is resized), the popup shifts its position sligthly in regards to the feature, so that the pointy tip of the popup no longer aligns with it. We did not observe this effect when resizing the window horizontally or vertically. Also, panning the map causes the popup to be re-drawn correctly. This is not a major issue, but we would like to know if there is something we can do about this.

Here is the popup before resizing:

Popup before resizing

And here it is after:

Popup after resizing

The issue can be reproduced with the sample code provided by ESRI: Get started with popups - 4.0 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
FC_Basson
MVP Regular Contributor

Similar issues have been mentioned in theses Geonet posts:

Scrolling down a page with a map 

Mouse misaligned in ArcGIS API for JS 

The popup anchor is definitely not repositioning on the screen resize event, but does when you pan the map again like you mentioned.  I think it is "buggy" and should be fixed for the 4.1 release.

View solution in original post

2 Replies
FC_Basson
MVP Regular Contributor

Similar issues have been mentioned in theses Geonet posts:

Scrolling down a page with a map 

Mouse misaligned in ArcGIS API for JS 

The popup anchor is definitely not repositioning on the screen resize event, but does when you pan the map again like you mentioned.  I think it is "buggy" and should be fixed for the 4.1 release.

DavidNascimento
Deactivated User

Thank you for the reply. We'll just update to 4.1 when it is released.

0 Kudos