{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/frontend/issues/11410","labels_url":"https://api.github.com/repos/guardian/frontend/issues/11410/labels{/name}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/11410/comments","events_url":"https://api.github.com/repos/guardian/frontend/issues/11410/events","html_url":"https://github.com/guardian/frontend/pull/11410","id":123470169,"number":11410,"title":"Bottom responsive banner on tablets","user":{"login":"regiskuckaertz","id":629976,"avatar_url":"https://avatars.githubusercontent.com/u/629976?v=3","gravatar_id":"","url":"https://api.github.com/users/regiskuckaertz","html_url":"https://github.com/regiskuckaertz","followers_url":"https://api.github.com/users/regiskuckaertz/followers","following_url":"https://api.github.com/users/regiskuckaertz/following{/other_user}","gists_url":"https://api.github.com/users/regiskuckaertz/gists{/gist_id}","starred_url":"https://api.github.com/users/regiskuckaertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regiskuckaertz/subscriptions","organizations_url":"https://api.github.com/users/regiskuckaertz/orgs","repos_url":"https://api.github.com/users/regiskuckaertz/repos","events_url":"https://api.github.com/users/regiskuckaertz/events{/privacy}","received_events_url":"https://api.github.com/users/regiskuckaertz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-22T12:08:54Z","updated_at":"2015-12-22T16:53:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/11410","html_url":"https://github.com/guardian/frontend/pull/11410","diff_url":"https://github.com/guardian/frontend/pull/11410.diff","patch_url":"https://github.com/guardian/frontend/pull/11410.patch"},"body":"So, the responsive takeover at the bottom of the page is not loaded on tablets. On tablets:\r\n\r\n![img_0064](https://cloud.githubusercontent.com/assets/629976/11954710/7be44488-a8a2-11e5-9549-610be558a00f.png)\r\n\r\nOn a desktop:\r\n\r\n![screen shot 2015-12-22 at 11 51 01](https://cloud.githubusercontent.com/assets/629976/11954653/1fe81290-a8a2-11e5-95c1-c080b1d26895.png)\r\n\r\nIt turns out the ad loads, but only if we're at the bottom of the page and hit reload then. So, it must be something with how ads are lazy loaded. Lazy loading happens when a scroll event occurs, and in the codebase scrolls are mediated through another event which wraps event handlers in `fastdom.read`:\r\n\r\n```\r\nmediator.on('window:throttledScroll', lazyLoad);\r\n```\r\n\r\n`lazyLoad` is never called. Replacing the line above with:\r\n\r\n```\r\nwindow.addEventListener('scroll', lazyLoad);\r\n```\r\n\r\n... and the whole thing works. For good measure, `lazyLoad` is debounced at 200ms which is more than enough for us to test whether there's a slot that needs to be loaded in the area, and the bulk of the work is offloaded to the next animation frame.\r\n\r\nSo if the *traditional approach* is working, there must be something with the way `throttledScroll` works, and the only difference between the two is Fastdom. While the bug in this case is solved, there may be many more lurking in the codebase, and a deeper inspection of how Fastdom works appears to become an urgent issue."},"comment":{"url":"https://api.github.com/repos/guardian/frontend/issues/comments/166672110","html_url":"https://github.com/guardian/frontend/pull/11410#issuecomment-166672110","issue_url":"https://api.github.com/repos/guardian/frontend/issues/11410","id":166672110,"user":{"login":"regiskuckaertz","id":629976,"avatar_url":"https://avatars.githubusercontent.com/u/629976?v=3","gravatar_id":"","url":"https://api.github.com/users/regiskuckaertz","html_url":"https://github.com/regiskuckaertz","followers_url":"https://api.github.com/users/regiskuckaertz/followers","following_url":"https://api.github.com/users/regiskuckaertz/following{/other_user}","gists_url":"https://api.github.com/users/regiskuckaertz/gists{/gist_id}","starred_url":"https://api.github.com/users/regiskuckaertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regiskuckaertz/subscriptions","organizations_url":"https://api.github.com/users/regiskuckaertz/orgs","repos_url":"https://api.github.com/users/regiskuckaertz/repos","events_url":"https://api.github.com/users/regiskuckaertz/events{/privacy}","received_events_url":"https://api.github.com/users/regiskuckaertz/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T16:53:33Z","updated_at":"2015-12-22T16:53:33Z","body":"@OliverJAsh so that's it. I tested on iPad mini and couldn't see any lag/jank at scroll that wasn't there before."}}