1
0
Fork 0

🐛 fix DeckEditor iframe resize issue in chrome 61

This commit is contained in:
deardrops 2017-09-28 23:25:19 +08:00 committed by webxoss
parent 956658e3dc
commit a8c37e7d85

View file

@ -293,13 +293,12 @@ function changeLanguage() {
function handleDeckEditor() { function handleDeckEditor() {
var iFrame = $('deck-editor'); var iFrame = $('deck-editor');
//resizeIFrameToFitContent // resize iframe to fit content
iFrame.width = iFrame.contentWindow.document.body.scrollWidth; iFrame.width = iFrame.contentWindow.document.body.scrollWidth || iFrame.contentDocument.documentElement.scrollWidth;
iFrame.height = iFrame.contentWindow.document.body.scrollHeight; iFrame.height = iFrame.contentWindow.document.body.scrollHeight || iFrame.contentDocument.documentElement.scrollHeight;
// disable deck-editor return // disable deck-editor return
iFrame.contentDocument iFrame.contentDocument.getElementById('link-back-to-webxoss').href = "#"
.getElementById('link-back-to-webxoss').href = "#"
// auto update deck names when change in deckEditor // auto update deck names when change in deckEditor
window.addEventListener('storage', function(e) { window.addEventListener('storage', function(e) {