Skip to content

Commit

Permalink
Revert documentLoaded refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Jun 4, 2019
1 parent e94a1cd commit 1126e96
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion js/documents.js
Expand Up @@ -628,7 +628,17 @@ var documentsMain = {
documentsMain.wopiClientFeatures = msg.Values.Features;
documentsMain.overlay.documentOverlay('hide');

documentsMain.callMobileMessage('documentLoaded');
// Forward to mobile handler
if (window.RichDocumentsMobileInterface) {
window.RichDocumentsMobileInterface.documentLoaded();
}

// iOS webkit fallback
if (window.webkit
&& window.webkit.messageHandlers
&& window.webkit.messageHandlers.RichDocumentsMobileInterface) {
window.webkit.messageHandlers.RichDocumentsMobileInterface.postMessage('documentLoaded');
}
} else if (msg.Values.Status === "Document_Loaded" ) {
window.removeEventListener('message', editorInitListener, false);
if (documentsMain.getFileList()) {
Expand Down

0 comments on commit 1126e96

Please sign in to comment.