Page automatically scrolls down in 4.9

1206
4
10-30-2018 07:15 AM
DouglasGreenfield
New Contributor III

I recently upgraded some web maps from version 4.5 to 4.9. Now when closing popups the window automatically scrolls down so you don't see my page headers-until you scroll back up. This happens in Chrome and IE but not Firefox. Does anyone know why or more importantly how to stop this behavior?

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Douglas,

   I have not seen this behavior. Can you provide a quick sample that demos that behavior?

0 Kudos
DouglasGreenfield
New Contributor III

Thanks for looking into this! Compare the following two pages - just don't use Firefox as that browser works fine. The second version was written using version 4.9 of the api, the other one is 4.5. Notice the blue header at the top. Click on a property or do an address search - either way you get a popup. Once you close the popup window the page scrolls down and you have to scroll back up to get the header back in the 2nd version.

Newton GIS Browser 

Newton GIS Browser

0 Kudos
MattDriscoll
Esri Contributor

Hey Douglas,

It seems part of the map view is outside of the page. You can tell because the whole map should have a focus outline when focussed.

When the popup is closed, the map view goes back into focus which brings the page down.

In order to fix this, you'll have to set overflow hidden on a div so that it won't be able to scroll or bring the view up so that it is fully visible and won't scroll down.

I would suggest positioning the header absolutely and having over the map with some view padding.

-Matt

DouglasGreenfield
New Contributor III

Thanks! The overflow: hidden didn't change anything. Playing with the padding didn't help much either but it gave me the idea to play with the size of the div. After much trial and error I set the div height to 93.5% (basically the page minus the header) and that worked. There is probably a better way to do this like height = page - nav or something like that but I'm not great with .css. I might actually try that out to see if that does anything for me.Thanks everyone for your help.

0 Kudos