[evolution] I#1068 - Attached event invitation not properly displayed ][



commit 35709774080c64a6892e95cf7b7cf42f7becfd27
Author: Milan Crha <mcrha redhat com>
Date:   Thu Sep 3 15:20:21 2020 +0200

    I#1068 - Attached event invitation not properly displayed ][
    
    This change covers when there's a message attached, which contains
    the invitation, which can be inline or also attached.
    
    Related to https://gitlab.gnome.org/GNOME/evolution/-/issues/1068

 data/webkit/e-web-view.js | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/data/webkit/e-web-view.js b/data/webkit/e-web-view.js
index 9f3f1cf865..2e87eaed1d 100644
--- a/data/webkit/e-web-view.js
+++ b/data/webkit/e-web-view.js
@@ -628,6 +628,8 @@ Evo.initialize = function(elem)
 
                if (iframe.contentDocument && iframe.contentDocument.body && 
iframe.contentDocument.body.childElementCount > 0)
                        Evo.initializeAndPostContentLoaded(iframe);
+               else if (iframe.contentDocument && iframe.contentDocument.body)
+                       iframe.contentDocument.body.onload = function() { 
Evo.initializeAndPostContentLoaded(this); };
        }
 
        /* Ensure selection, used for the caret mode */
@@ -686,22 +688,33 @@ Evo.initializeAndPostContentLoaded = function(elem)
        else if (window.frameElement)
                iframe_id = window.frameElement.id;
 
+       Evo.initialize(elem);
+
        /* Skip, when its content is not loaded yet */
        if (iframe_id != "" && elem && elem.tagName == "IFRAME" && elem.contentDocument &&
            (!elem.contentDocument.body || !elem.contentDocument.body.childElementCount)) {
                if (elem.contentDocument.body) {
                        elem.contentDocument.body.onload = function() { 
Evo.initializeAndPostContentLoaded(this); };
                }
-               return;
+       } else {
+               window.webkit.messageHandlers.contentLoaded.postMessage(iframe_id);
        }
 
-       Evo.initialize(elem);
-       window.webkit.messageHandlers.contentLoaded.postMessage(iframe_id);
-
        if (window.webkit.messageHandlers.mailDisplayMagicSpacebarStateChanged)
                Evo.mailDisplayUpdateMagicSpacebarState();
 
        Evo.AddTooltipToLinks(iframe_id);
+
+       var traversar = {
+               exec : function(doc, ifrm_id, level) {
+                       if (doc.body && doc.body.firstElementChild) {
+                               window.webkit.messageHandlers.contentLoaded.postMessage(ifrm_id);
+                       }
+                       return true;
+               }
+       };
+
+       Evo.foreachIFrameDocument(document, traversar, false, 0);
 }
 
 Evo.EnsureMainDocumentInitialized = function()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]