Merge 2582c50783
into d3d003e978
commit
b843328208
|
@ -662,7 +662,7 @@ H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFull
|
||||||
|
|
||||||
before('h5p-fullscreen');
|
before('h5p-fullscreen');
|
||||||
var first, eventName = (H5P.fullScreenBrowserPrefix === 'ms' ? 'MSFullscreenChange' : H5P.fullScreenBrowserPrefix + 'fullscreenchange');
|
var first, eventName = (H5P.fullScreenBrowserPrefix === 'ms' ? 'MSFullscreenChange' : H5P.fullScreenBrowserPrefix + 'fullscreenchange');
|
||||||
document.addEventListener(eventName, function () {
|
document.addEventListener(eventName, function fullscreenCallback() {
|
||||||
if (first === undefined) {
|
if (first === undefined) {
|
||||||
// We are entering fullscreen mode
|
// We are entering fullscreen mode
|
||||||
first = false;
|
first = false;
|
||||||
|
@ -672,7 +672,7 @@ H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFull
|
||||||
|
|
||||||
// We are exiting fullscreen
|
// We are exiting fullscreen
|
||||||
done('h5p-fullscreen');
|
done('h5p-fullscreen');
|
||||||
document.removeEventListener(eventName, arguments.callee, false);
|
document.removeEventListener(eventName, fullscreenCallback, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (H5P.fullScreenBrowserPrefix === '') {
|
if (H5P.fullScreenBrowserPrefix === '') {
|
||||||
|
|
Loading…
Reference in New Issue