I have created a sidebar that opens and closes. When it opens, it adds margin to the map container ( calling w3_open() ). See pen below.
However the interactions on the map e.g. clicking on the feature (getfeatureinfo) is wrong when there is margin on the left. I click on one feature but another feature is clicked
Probably I need to update map view when there it adds margin?
Also note that when open and close browser's console for some weird reason the problem is fixed.
https://codepen.io/csandreas1/pen/xoWGyB?editors=1010
<script>
function w3_open() {
document.getElementById("main").style.marginLeft = "25%";
document.getElementById("mySidebar").style.width = "25%";
document.getElementById("mySidebar").style.display = "block";
document.getElementById("openNav").style.display = 'none';
}
function w3_close() {
document.getElementById("main").style.marginLeft = "0%";
document.getElementById("mySidebar").style.display = "none";
document.getElementById("openNav").style.display = "inline-block";
}
</script>

map.updateSize();actually caused me more issues – csandreas1 Jul 01 '19 at 13:22map.updateSize();and redraw the popup overlay. this way i was able to get the same coordinate after opening/closing the menu. – zwnk Jul 01 '19 at 13:54