I am using https://github.com/private-face/jquery.fullscreen for fullscreen in my web page.
In my page I have a button that opens a popup on click, on opening popup the fullscreen gets exit in chrome but not in other browsers.
What might be the reason behind this? Is there any workarounds for this issue?
This example is taken from github page , it works on my local system, but snipet here does not works,I'm sorry
$( document ).ready(function() {
// check native support
$('#support').text($.fullscreen.isNativelySupported() ? 'supports' : 'doesn\'t support');
// open in fullscreen
$('#fullscreen .requestfullscreen').click(function() {
$('#fullscreen').fullscreen();
return false;
});
// exit fullscreen
$('#fullscreen .exitfullscreen').click(function() {
$.fullscreen.exit();
return false;
});
// document's event
$(document).bind('fscreenchange', function(e, state, elem) {
// if we currently in fullscreen mode
if ($.fullscreen.isFullScreen()) {
$('#fullscreen .requestfullscreen').hide();
$('#fullscreen .exitfullscreen').show();
$('#fullscreen .btn').show();
} else {
$('#fullscreen .requestfullscreen').show();
$('#fullscreen .exitfullscreen').hide();
}
$('#state').text($.fullscreen.isFullScreen() ? '' : 'not');
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="https://raw.githubusercontent.com/private-face/jquery.fullscreen/master/release/jquery.fullscreen.min.js"></script>
<div id="main">
<div id="fullscreen" style="background-color: #fff; color: #000;">
<h2>Example</h2>
<p>Your browser <span id="support">doesn't support</span> FullScreen API.</p>
<p>This block is <span id="state">not</span> in fullscreen mode. <a href="#" class="requestfullscreen">Click to open it in fullscreen</a><a href="#" class="exitfullscreen" style="display: none">Click to exit fullscreen</a>.</p>
<button type="button" class="btn" onclick="window.open('http://stackoverflow.com/','Page','menubar=no, status=no, scrollbars=no, menubar=no, width=200, height=100');">hello</button>
</div>
</div>