-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
Description
.width() is incorrect value in fullscreen mode of iframe.
I got 12800 on IE11. IE Edge is OK.
<iframe src="iframe.html" allowFullscreen webkitAllowFullscreen></iframe>iframe.html, html
<div id="fs" style="width:100%;height:100px;background-color:green;color:black;">
<p><input type="button" value="fullscreen" id="run"></p>
<p><input type="button" value="test" id="test"></p>
<p id="output"></p>
</div>iframe.html, javascript
jQuery(function($){
$('#test').click(function(){
$('#output').text( $('#fs').width() );
});
$('#run').click(function(){
pageEnterFullScreen( $('#fs')[0] );
});
});
function pageEnterFullScreen(element){
if( element.requestFullscreen ){
element.requestFullscreen();
}else if( element.msRequestFullscreen ) {
element.msRequestFullscreen();
}else if(element.mozRequestFullScreen ){
element.mozRequestFullScreen();
}else if(element.webkitRequestFullscreen ){
element.webkitRequestFullscreen();
}
}