Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Add style = "position: absolute;" on the SVG to skip the bug of Chrome 18 #467

merged 1 commit into from

5 participants


See #392

All test ok on: FF 12.0; Chrome 18.0.1025.168 m; IE9; Safari 5.1.7 except "Layer/Google.html" since they are not used a proper key.

NOTE: Using Opera 11.60 fail some test, the same with or without patch, so no problem of the patch. (falis: Format/XML.html, Format/KML.html, Format/WMTSCapabilities/v1_0_0.html, Format/WPSExecute.html: Format/OWSCommon/v1_1_0.html, Format/ArcXML.html, Layer/Markers.html)

I tried it on several examples that use features: zoom-in, zoom-out, pan, modify, and of course reduce the size of the window on full screen. Everything seems ok.


This sounds like a nice simple fix. Since none of the tests are going to cover this, I think the important thing here is to ensure that this works with a variety of layouts (our examples are almost all identical).


can confirm that this patch works nicely on my 100% map divs - not spotted any problems so far



Since none of the tests are going to cover this...

Yes I know, I preferred to pass them all yet many unrelated

I think the important thing here is to ensure that this works with a variety of layouts...

Yes, yes. I tested with browsers above several examples, mainly "sundials.html" and "modify-feature.html". I especially looking for what happens to move the map by placing a portion of a polygon out the map div, and drag a feature to map div border, also zoom-in and zoom-out...

Today I repeated the tests, all seems ok. A curiosity using IE9 polygons are not cut into the border of the map, either with or without the patch.


I'm doing tests in Ext JS layouts right now.


I've used GeoExt's mappanel-div, mappanel-window and mappanel-viewport examples in my tests, with a vector layer added to each example's map:

    var vectors = new OpenLayers.Layer.Vector('Vectors');
        new OpenLayers.Feature.Vector(
                'POLYGON((-4.921875 51.960938572884,-4.74609375 41.414063572884,8.7890625 41.062501072884,9.66796875 51.785157322884,-4.921875 51.960938572884))'

I could easily reproduce the bug in Chrome 19 without @jorix's patch.

@jorix's patch does fix the issue in these examples in Chrome 19, and the examples still behave as expected in FireFox and IE 9.

@elemoine elemoine merged commit 24b1fa1 into openlayers:2.12

This change breaks the FeatureRenderer in GeoExt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/OpenLayers/Renderer/SVG.js
4 lib/OpenLayers/Renderer/SVG.js
@@ -446,7 +446,9 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
* {DOMElement} The specific render engine's root element
createRenderRoot: function() {
- return this.nodeFactory( + "_svgRoot", "svg");
+ var svg = this.nodeFactory( + "_svgRoot", "svg");
+ = "absolute";
+ return svg;
Something went wrong with that request. Please try again.