Skip to content

Commit d8405d7

Browse files
author
Alexis Beingessner
committed
Ticket OscarGodson#132 - fixing fullscreen
1 parent 7e3849e commit d8405d7

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

epiceditor/js/epiceditor.js

+10
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,10 @@
680680
// TODO: Move into fullscreen setup function (_setupFullscreen)
681681
_elementStates = {}
682682
self._goFullscreen = function (el) {
683+
if (self.settings.autogrow) {
684+
self.getElement('editor').documentElement.style.overflow = "auto";
685+
self.getElement('previewer').documentElement.style.overflow = "auto";
686+
}
683687

684688
if (self.is('fullscreen')) {
685689
self._exitFullscreen(el);
@@ -779,6 +783,11 @@
779783
};
780784

781785
self._exitFullscreen = function (el) {
786+
if (self.settings.autogrow) {
787+
self.getElement('editor').documentElement.style.overflow = 'hidden';
788+
self.getElement('previewer').documentElement.style.overflow = 'hidden';
789+
}
790+
782791
_saveStyleState(self.element, 'apply', _elementStates.element);
783792
_saveStyleState(self.iframeElement, 'apply', _elementStates.iframeElement);
784793
_saveStyleState(self.editorIframe, 'apply', _elementStates.editorIframe);
@@ -1760,6 +1769,7 @@
17601769

17611770
//autogrow in fullscreen is nonsensical
17621771
if (!this.is('fullscreen')) {
1772+
console.log('autogrow');
17631773
if (this.is('edit')) {
17641774
el = this.getElement('editor').documentElement;
17651775
}

0 commit comments

Comments
 (0)