Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@OscarGodson
Created February 28, 2012 08:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OscarGodson/9ace07aa0c7e532f9311 to your computer and use it in GitHub Desktop.
Save OscarGodson/9ace07aa0c7e532f9311 to your computer and use it in GitHub Desktop.
//Sets up the fullscreen editor/previewer
if (fullScreenApi.supportsFullScreen) {
var fsElement = document.getElementById(self.settings.id);
//...codes
self.iframe.getElementsByClassName('epiceditor-fullscreen-btn')[0].addEventListener('click',function(){
if(_getStyle(self.previewer,'display') === 'block'){
revertBackTo = self.previewer;
}
fullScreenApi.requestFullScreen(fsElement);
});
fsElement.addEventListener(fullScreenApi.fullScreenEventName,function(){
console.log('TEST')
if (fullScreenApi.isFullScreen()) {
fsBtns.style.visibility = 'hidden';
//...codes
self.preview(true);
var fullscreenLivePreview = self.editor.addEventListener('keyup',function(){
self.preview(true);
});
}
else{
//...codes
}
}, true);
}
@johndyer
Copy link

I guess you have to change this line:
fsElement.addEventListener(fullScreenApi.fullScreenEventName,function(){
to
document.addEventListener(fullScreenApi.fullScreenEventName,function(){

for Firefox to fire the event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment