PopUp moves based on window Scroll Bar

3223
9
11-25-2016 10:36 PM
CoryJorgensen
New Contributor II

I have a map inside a div with some graphic positions added to the map.  When I click on a freature, it activates the popup.  My div is part of multiple divs on the page, and if I scroll the page, the popup will scroll the map it seems the difference of the map location and the scroll of the window.  If my browser window is scrolled to the top, the popup is placed in the right spot on the map, but if I scroll the window down and move my map, the popup displaces the map the distance I have scrolled.  Is there a way to stop this?

Tags (1)
9 Replies
AdrianWelsh
MVP Honored Contributor

Cory,

Maybe it would be helpful if you post your segment of code that shows the popup?

0 Kudos
CoryJorgensen
New Contributor II

Please go here and view how this is working:

https://www.permittrax.com/Citizen/Web_Public/CitizenConn_Main.aspx?R=a0Xg9xaO7RPcvJfQ3GtMzn1k%2bLBz... 

This is where I have developed the map.  If you click on a marker on the map, it will show the box up at the top right.  But, if you scroll the page a little so it is centered on the screen, then click on it.  You will see that it moves the map and the marker is moved off the map.

0 Kudos
AdrianWelsh
MVP Honored Contributor

Wow, that is crazy. I haven't seen that before....

Can you post the code you used for writing this? (I do not know how to fix this but surely someone here has experienced this...)

0 Kudos
CoryJorgensen
New Contributor II

Here is a link to a JSFIDDLE that shows the problem.  I re-created my page without all the ASP.NET stuff.  It happens on this page as well.  Just scroll the map up and click on a feature and look where the info window goes.

Edit fiddle - JSFiddle 

0 Kudos
CoryJorgensen
New Contributor II

This is a scaled down JSFiddle with less HTML and junk, the problem still happens.

Edit fiddle - JSFiddle 

0 Kudos
CoryJorgensen
New Contributor II

Ok, I have added a new jsfiddle.  This is a very scaled down version of my map and the issue.  When you scroll to the map and then click on a feature, the popup seems to be offset by the scroll.  How can I fix this?

ESRI Map Issue - JSFiddle 

0 Kudos
LaxmanThapa
New Contributor II

I also has similar problem. @Cory Jorgensen, did you solve this problem. and can you please share your solution.

Kind regards

Laxman

0 Kudos
CoryJorgensen
New Contributor II

No, we have not found a solution yet.  I have a developer working on it but it seems to be on the ESRI Javascript side.

LaxmanThapa
New Contributor II

Thanks for the quick reply @Cory Jorgesen. Can you please share your solution when you fix it.

0 Kudos