PopupTemplate click target offset if any margin

2612
5
01-27-2016 12:51 PM
MichaelMatuszak
New Contributor II

Using the Popup sample, if you put any top/left margin at all on the viewDiv, the click target is offset by a corresponding amount (easier to see if you switch to displaying Point symbols).  For example, if you have a 20px left margin, you have to click 20px to the right of where the symbol is displayed on the map.  Similarly for any top margin (or other positioning).  Right/Bottom margins do not seem to affect anything.

I think something in the API is making an assumption that the map will always be flush with the top left of the browser window, or possibly that it might be applying the offset twice, since you have to click in the opposite direction of where the feature/graphic would be located if the margin did not exist.

5 Replies
ChrisSmith7
Frequent Contributor

It might be an issue with the v4 beta JSAPI - it doesn't appear to affect 3.15 - http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=renderer_generate_renderer

0 Kudos
MichaelMatuszak
New Contributor II

I think so.  Is this forum the best place to log the issue, or is there an actual bug tracking system I should be using?

0 Kudos
ChrisSmith7
Frequent Contributor

Esri staff do monitor the forums - it's possible Bjorn Svensson​ may have some insight and could log a bug (if it turns-out to be one). Since it is in beta, Esri is still working-out the kinks. Do you need v4 API functionality? I would be wary of using v4 in any sort of production capacity.

0 Kudos
MichaelMatuszak
New Contributor II

The project is still a ways from release, but I wouldn't want to start any new development in 3.x considering the official guidance on migrating to 4.0 is "Consider rewriting applications instead of simply trying to update them."

It just so happens the first functionality we're implementing involves Popups on Point symbols, which this defect makes pretty unusable when embedded within our site.

0 Kudos
BjornSvensson
Esri Regular Contributor

Michael Matuszak​ - The best place to log issues is to contact Esri support - http://support.esri.com/en/

As for this issue, yes, that seems to be a bug with the beta 3. Thanks for letting us know.