{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3346","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3346/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3346/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3346/events","html_url":"https://github.com/Leaflet/Leaflet/pull/3346","id":65668115,"number":3346,"title":"Fix tile loading in IE8","user":{"login":"RLRR","id":4540062,"avatar_url":"https://avatars.githubusercontent.com/u/4540062?v=3","gravatar_id":"","url":"https://api.github.com/users/RLRR","html_url":"https://github.com/RLRR","followers_url":"https://api.github.com/users/RLRR/followers","following_url":"https://api.github.com/users/RLRR/following{/other_user}","gists_url":"https://api.github.com/users/RLRR/gists{/gist_id}","starred_url":"https://api.github.com/users/RLRR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RLRR/subscriptions","organizations_url":"https://api.github.com/users/RLRR/orgs","repos_url":"https://api.github.com/users/RLRR/repos","events_url":"https://api.github.com/users/RLRR/events{/privacy}","received_events_url":"https://api.github.com/users/RLRR/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Leaflet/Leaflet/labels/needs%20review","name":"needs review","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-01T12:05:18Z","updated_at":"2015-04-02T14:04:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Leaflet/Leaflet/pulls/3346","html_url":"https://github.com/Leaflet/Leaflet/pull/3346","diff_url":"https://github.com/Leaflet/Leaflet/pull/3346.diff","patch_url":"https://github.com/Leaflet/Leaflet/pull/3346.patch"},"body":"See #3332. Minimal steps to reproduce the bug:\r\n\r\n1. Drag the map a couple of screens away (zooming is not necessary)\r\n2. Drag back to original position\r\n\r\nThe problem is related to browser caching.  IE8 seems to call `onload` handlers of `<img>` elements synchronously (immediately after assignment to `tile.src`) if it gets the image from cache.\r\n\r\nThis caused the `_tileReady` handler (in `GridLayer`) to be called before a tile was added to `this._tiles` object, so the handler returned without applying `leaflet-tile-loaded` class to the element.\r\n\r\nThis pull request fixes the bug with a simple `setTimeout` hack. I wasn't able to find a more elegant solution without changing a lot of code."},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/comments/88916772","html_url":"https://github.com/Leaflet/Leaflet/pull/3346#issuecomment-88916772","issue_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/3346","id":88916772,"user":{"login":"mourner","id":25395,"avatar_url":"https://avatars.githubusercontent.com/u/25395?v=3","gravatar_id":"","url":"https://api.github.com/users/mourner","html_url":"https://github.com/mourner","followers_url":"https://api.github.com/users/mourner/followers","following_url":"https://api.github.com/users/mourner/following{/other_user}","gists_url":"https://api.github.com/users/mourner/gists{/gist_id}","starred_url":"https://api.github.com/users/mourner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mourner/subscriptions","organizations_url":"https://api.github.com/users/mourner/orgs","repos_url":"https://api.github.com/users/mourner/repos","events_url":"https://api.github.com/users/mourner/events{/privacy}","received_events_url":"https://api.github.com/users/mourner/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T14:04:05Z","updated_at":"2015-04-02T14:04:05Z","body":"Wow, nice! Can't say if there's a better fix, lets go with this one for now."}}