Hi all,<br><br>I have a problem with PanZoomBar Control when map is
inserted at bottom of page and when a scrollbar appears in Firefox : a
click in the div zoomBar zooms at the maximum level zoom. No problem
with Chrome and no problem when map is inserted at top of page without
scrollbar.<br>
<br>I find out that in the OnButtonClick method of the PanZoomBar
control, evt.buttonXY.y returns a bad value (line 280) (position of the
click in the page instead of zero), linked to the
OpenLayers.Util.pagePosition function in buttonclick.js (line 152). When
getting the viewportElement, in Firefox document.documentElement is
always returned.<br>
The matter is when the Document Type Declaration in the HTML file is
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">"<div id=":16r">
, document.compatMode returns "CSS1Compat" and viewportElement.scrollTop returns a bad value. (line 1189 of Util.js)<br>
<br>The bug can be reproduced in the HTML file joined with Firefox (
link to OpenLayers lib must be changed ). If you remove the DTD or if
you put map div at top of page or if you launch it in Chrome, PanZoomBar
control works well.<br>
The patch joined resolves the problem returning document.body instead of
documentElement when compatMode is 'CSS1Compat' and browser FireFox but
it's likely this isn't the best method... what do you think about it ?<br>
<br><br>Regards,<br><br><br clear="all"><font style size="2">Barbara PHILIPPOT</font><br>Géomaticienne<br>Observatoire Régional des Urgences PACA</div>