-
-
Save OscarGodson/9ace07aa0c7e532f9311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.