[evolution] Bug 778423 - Deleting quoted content from GMail could leave empty blocks



commit 57391c9fb93b3b72120325c8a3724d0c0482213a
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Apr 28 16:03:16 2017 +0200

    Bug 778423 - Deleting quoted content from GMail could leave empty blocks
    
    These workarounds for GMail.. Don't insert a new BR if there is no
    sibling after the blockquote otherwise it will prevent the BLOCKQUOTE to
    be correctly deleted.

 .../web-extension/e-editor-dom-functions.c         |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 15b47e6..9a7171f 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -1417,7 +1417,8 @@ repair_gmail_blockquotes (WebKitDOMDocument *document)
                webkit_dom_element_remove_attribute (WEBKIT_DOM_ELEMENT (node), "style");
                webkit_dom_element_set_attribute (WEBKIT_DOM_ELEMENT (node), "type", "cite", NULL);
 
-               if (!WEBKIT_DOM_IS_HTML_BR_ELEMENT (webkit_dom_node_get_last_child (node)))
+               if (!WEBKIT_DOM_IS_HTML_BR_ELEMENT (webkit_dom_node_get_last_child (node)) &&
+                   webkit_dom_node_get_next_sibling (node))
                        webkit_dom_node_append_child (
                                node,
                                WEBKIT_DOM_NODE (


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