I found a Christopher's answser on <span id=":vk" class="g3" title="Thu, Apr 23, 2009 at 4:57 PM" alt="Thu, Apr 23, 2009 at 4:57 PM">4/23/09</span> to a similar problem; basically you just register a function on the "onscroll" event of the scrolled pane an call map.updateSize();<br>
It works for me, let me know if it's the same for you.<br>Thank's a lot to Chris...<br><br><span id="q_120d3c466b28f297_0" class="h4"><br>- Show quoted text -</span><div class="h5">On Thu, Apr 23, 2009 at 11:32:55AM -0400, ashley_c_mort wrote:<br>
> Hello all. I am relatively new to OpenLayers and have a quick question.<br>
><br>
> I have an OpenLayers map within a page that contains scrollbars. If I<br>
> scroll within my webpage, my OpenLayers <span class="il">getMousePosition</span>() XY coordinates<br>
> are off by the amount that I scrolled. Is there an OpenLayers solution/fix<br>
> for this? Or is the solution just to keep the OpenLayers map within a<br>
> container with no scrollbars at all times?<br>
<br>
</div>
call map.updateSize() on the map after the pane is scrolled, perhaps? We<br>
may only look at scroll distances at the document level; I don't recall<br>
looking into this issue on sub-panes before.<br>
<br><br><br><div class="gmail_quote">On Tue, Dec 29, 2009 at 2:28 PM, Ringdahl Niklas <span dir="ltr"><<a href="mailto:Niklas.Ringdahl@sweco.se">Niklas.Ringdahl@sweco.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font size="2" color="#0000ff" face="Arial">I am also experiencing an issue that sounds like yours. I
am using a UI framework (JSF) that opens the map in a floating div (imitating a
window), and when the underlying page is scrolled, the zoom box appears below
the mouse pointer. I realized recently that the distance is equal to the amount
of scrolled pixels, as if the map object believes that is being scrolled down
with the page.</font></span></div>
<div dir="ltr" align="left"><span><font size="2" color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font size="2" color="#0000ff" face="Arial">The problem can be caused by the mixing of javascript and
css libraries, of course, but if anyone has a neat little trick to solve this,
that would be highly appreciated.</font></span></div>
<div dir="ltr" align="left"><span><font size="2" color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font size="2" color="#0000ff" face="Arial">Thanks!</font></span></div>
<div dir="ltr" align="left"><span><font size="2" color="#0000ff" face="Arial">- Niklas</font></span></div>
<div dir="ltr" align="left"><span><font size="2" color="#0000ff" face="Arial"></font></span> </div><br>
<div dir="ltr" align="left" lang="sv">
<hr>
<font size="2" face="Tahoma"><b>Från:</b> <a href="mailto:dev-bounces@openlayers.org" target="_blank">dev-bounces@openlayers.org</a>
[mailto:<a href="mailto:dev-bounces@openlayers.org" target="_blank">dev-bounces@openlayers.org</a>] <b>För </b>Gianni
Barrotta<br><b>Skickat:</b> den 23 december 2009 18:45<br><b>Till:</b>
<a href="mailto:Dev@openlayers.org" target="_blank">Dev@openlayers.org</a><br><b>Ämne:</b> [OpenLayers-Dev] Probable draw
issue<br></font><br></div><div><div></div><div class="h5">
<div></div>Hi, <br>I've experienced a problem when the Map is inside a div
whoose css style have a "overflow-y:auto" property.<br><br><i><div
style="height:600px;overflow-y:auto;"><br>
<div
id="map"></div><br></div></i><br><br>If I scrooll down the div
with the overflow, the bbox (and the draw controls too) appears to be shifted
down of the number of pixel of the scrollbar.<br>Does anyone experienced
something like this?<br>Thank's.<br></div></div></div>
</blockquote></div><br>