{"action":"created","issue":{"url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/243","labels_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/243/comments","events_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/243/events","html_url":"https://github.com/davidjbradshaw/iframe-resizer/issues/243","id":102871212,"number":243,"title":"calculated scroll position is wrong","user":{"login":"thenewguy","id":77731,"avatar_url":"https://avatars.githubusercontent.com/u/77731?v=3","gravatar_id":"","url":"https://api.github.com/users/thenewguy","html_url":"https://github.com/thenewguy","followers_url":"https://api.github.com/users/thenewguy/followers","following_url":"https://api.github.com/users/thenewguy/following{/other_user}","gists_url":"https://api.github.com/users/thenewguy/gists{/gist_id}","starred_url":"https://api.github.com/users/thenewguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenewguy/subscriptions","organizations_url":"https://api.github.com/users/thenewguy/orgs","repos_url":"https://api.github.com/users/thenewguy/repos","events_url":"https://api.github.com/users/thenewguy/events{/privacy}","received_events_url":"https://api.github.com/users/thenewguy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-24T19:20:50Z","updated_at":"2015-08-24T19:40:52Z","closed_at":null,"body":"I have encountered an issue where the host page is being scrolled to the wrong offset.\r\n\r\nI've attempted to override scrollCallback like the following:\r\n```\r\n        iFrameResize({\r\n            log: true,\r\n            checkOrigin: false,\r\n            heightCalculationMethod: 'taggedElement',\r\n            autoResize: false,\r\n            enablePublicMethods: true,\r\n            scrollCallback: function (x, y) {\r\n                console.log(\"[OVERRIDE] overrode scrollCallback\");\r\n                window.scrollTo(x, y-50);\r\n                return false;\r\n            }\r\n        })\r\n```\r\n\r\nThe issue is that any time the page is manually resized via the [contentframe's parentIFrame.size function](https://github.com/davidjbradshaw/iframe-resizer#size-customheight-customwidth) the scrollCallback override function is bypassed.\r\n\r\nI am testing embedding the iframe into a boostrapped page.  The problem is that the bootstrap header overlaps the iFrame when it is scrolled to.  In this case the header is 50px.  So when the host page scrolls to the iFrame it scrolls too far and the header covers some of the iframe.\r\n\r\nIs there any way to adjust the coords for all scrolling instead of only scroll methods triggered by the content frame?  If not, what is the recommend approach for something like this?"},"comment":{"url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/comments/134351540","html_url":"https://github.com/davidjbradshaw/iframe-resizer/issues/243#issuecomment-134351540","issue_url":"https://api.github.com/repos/davidjbradshaw/iframe-resizer/issues/243","id":134351540,"user":{"login":"davidjbradshaw","id":591634,"avatar_url":"https://avatars.githubusercontent.com/u/591634?v=3","gravatar_id":"","url":"https://api.github.com/users/davidjbradshaw","html_url":"https://github.com/davidjbradshaw","followers_url":"https://api.github.com/users/davidjbradshaw/followers","following_url":"https://api.github.com/users/davidjbradshaw/following{/other_user}","gists_url":"https://api.github.com/users/davidjbradshaw/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjbradshaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjbradshaw/subscriptions","organizations_url":"https://api.github.com/users/davidjbradshaw/orgs","repos_url":"https://api.github.com/users/davidjbradshaw/repos","events_url":"https://api.github.com/users/davidjbradshaw/events{/privacy}","received_events_url":"https://api.github.com/users/davidjbradshaw/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T19:40:52Z","updated_at":"2015-08-24T19:40:52Z","body":"Not sure I full understand the issue, do you have a simple test case?"}}