Permalink
Browse files

Unbind fullscreenchange event on cancel fullscreen, to prevent to cal…

…lback-function from a previous fullscreen is call multiple times
  • Loading branch information...
1 parent 5efea6e commit f409b8968cffb7ac6f3fe0e535929bdeb22f843f Morten Sjoegren committed May 25, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 fullscreen/jquery.fullscreen.js
@@ -44,6 +44,7 @@
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
+ $(document).off( 'fullscreenchange mozfullscreenchange webkitfullscreenchange' );
}
function onFullScreenEvent(callback){

0 comments on commit f409b89

Please sign in to comment.