Created
June 20, 2011 20:50
-
-
Save gregersrygg/1036551 to your computer and use it in GitHub Desktop.
Example to reproduce bug in FB.init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>test</title> | |
<style> | |
body { | |
margin: 0px; | |
} | |
#container { | |
width: 800px; | |
height: 1300px; | |
border: 2px solid blue; | |
} | |
aside { | |
position: absolute; | |
width: 100px; | |
height: 100px; | |
left:700px; | |
border: 1px dotted red; | |
} | |
/* This hack will fix the bug */ | |
/*#fb-root>div { | |
left: -10000px; | |
}*/ | |
</style> | |
<meta name="viewport" content="width = 800"/> | |
</head> | |
<body> | |
<div id="container"> | |
<h1>Test page</h1> | |
<p> | |
This page should be 800 pixels wide. You should get no scrollbars when resizing the browser-window to the right border. The border should fit exactly to the left and right edges of an iPad in both vertical and horizontal orientation. | |
</p> | |
<aside> | |
<div id="fb-root"></div> | |
<script type="text/javascript"> | |
window.fbAsyncInit = function() { | |
FB.init({appId: '123', status: true, cookie: true, xfbml: true}); | |
}; | |
(function() { | |
var e = document.createElement('script'); | |
e.async = true; | |
e.src = document.location.protocol + '//connect.facebook.net/nb_NO/all.js'; | |
document.getElementById('fb-root').appendChild(e); | |
}()); | |
</script> | |
fb-root is inside here | |
</aside> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment