Ticket #3657 (new bug)
Handler/Box.js - Causing map to shift when calculating boxOffsets in IE8
| Reported by: | ca0v | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | general | Version: | SVN |
| Keywords: | Cc: | ||
| State: |
Description
By adding these lines to the getBoxOffsets method the map will no longer shift in IE8. I could not determine why the map was shifting without this change...maybe scrollbars were being temporarily created...but certainly with this seemingly harmless change the issue was resolved. Set testDiv.style.top = testDivstyle.left = -9999 before adding the div to the document.
getBoxOffsets: function() {
if (!this.boxOffsets) {
// Determine the box model. If the testDiv's clientWidth is 3, then // the borders are outside and we are dealing with the w3c box // model. Otherwise, the browser uses the traditional box model and // the borders are inside the box bounds, leaving us with a // clientWidth of 1. var testDiv = document.createElement("div"); //testDiv.style.visibility = "hidden";
here -> testDiv.style.top = -9999; here -> testDiv.style.left = -9999;
testDiv.style.position = "absolute"; testDiv.style.border = "1px solid black";
