{"action":"created","issue":{"url":"https://api.github.com/repos/novus/nvd3/issues/1008","labels_url":"https://api.github.com/repos/novus/nvd3/issues/1008/labels{/name}","comments_url":"https://api.github.com/repos/novus/nvd3/issues/1008/comments","events_url":"https://api.github.com/repos/novus/nvd3/issues/1008/events","html_url":"https://github.com/novus/nvd3/pull/1008","id":72305083,"number":1008,"title":"Adding a safer version of getComputedTextLength","user":{"login":"pinny13","id":1291392,"avatar_url":"https://avatars.githubusercontent.com/u/1291392?v=3","gravatar_id":"","url":"https://api.github.com/users/pinny13","html_url":"https://github.com/pinny13","followers_url":"https://api.github.com/users/pinny13/followers","following_url":"https://api.github.com/users/pinny13/following{/other_user}","gists_url":"https://api.github.com/users/pinny13/gists{/gist_id}","starred_url":"https://api.github.com/users/pinny13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinny13/subscriptions","organizations_url":"https://api.github.com/users/pinny13/orgs","repos_url":"https://api.github.com/users/pinny13/repos","events_url":"https://api.github.com/users/pinny13/events{/privacy}","received_events_url":"https://api.github.com/users/pinny13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-04-30T23:05:05Z","updated_at":"2015-05-04T14:08:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/novus/nvd3/pulls/1008","html_url":"https://github.com/novus/nvd3/pull/1008","diff_url":"https://github.com/novus/nvd3/pull/1008.diff","patch_url":"https://github.com/novus/nvd3/pull/1008.patch"},"body":"Calling native getComputedTextLength on invisible elements will cause an exception (\"Unexpected call to method or property access\"). It can happen for several reasons. In my single page AngularJS app I got it because I was doing some DOM manipulations on promise.resolve, but user navigated to another page and then got back quickly, however the resolve code was still executing and IE threw an exception because while user went on another page the DOM has changed and text element was not there at some point. I also heard people getting this error in some scenarios using iframe, and older version of IE.\r\nThis method makes it safer to get a text length by attempting to check whether we can make this call and if not falls back to existing NVD3 method of calculating approximate text width."},"comment":{"url":"https://api.github.com/repos/novus/nvd3/issues/comments/98719926","html_url":"https://github.com/novus/nvd3/pull/1008#issuecomment-98719926","issue_url":"https://api.github.com/repos/novus/nvd3/issues/1008","id":98719926,"user":{"login":"liquidpele","id":1065913,"avatar_url":"https://avatars.githubusercontent.com/u/1065913?v=3","gravatar_id":"","url":"https://api.github.com/users/liquidpele","html_url":"https://github.com/liquidpele","followers_url":"https://api.github.com/users/liquidpele/followers","following_url":"https://api.github.com/users/liquidpele/following{/other_user}","gists_url":"https://api.github.com/users/liquidpele/gists{/gist_id}","starred_url":"https://api.github.com/users/liquidpele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liquidpele/subscriptions","organizations_url":"https://api.github.com/users/liquidpele/orgs","repos_url":"https://api.github.com/users/liquidpele/repos","events_url":"https://api.github.com/users/liquidpele/events{/privacy}","received_events_url":"https://api.github.com/users/liquidpele/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T14:08:07Z","updated_at":"2015-05-04T14:08:07Z","body":"Very cool, thanks!   @pinny13 sorry for the side conversation ;)"}}