[evolution/wip/webkit2] Bug 740475 - Quoted reply editing issues



commit 01dab88ce354c9a565ec1ed192b79c7d219eb900
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Mar 23 13:18:39 2015 +0100

    Bug 740475 - Quoted reply editing issues
    
    Check if won't add two BR elements in row to avoid unnecessary empty line.

 web-extensions/e-html-editor-view-dom-functions.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/web-extensions/e-html-editor-view-dom-functions.c 
b/web-extensions/e-html-editor-view-dom-functions.c
index b297db5..2bc68bf 100644
--- a/web-extensions/e-html-editor-view-dom-functions.c
+++ b/web-extensions/e-html-editor-view-dom-functions.c
@@ -1948,8 +1948,12 @@ body_keyup_event_cb (WebKitDOMElement *element,
                                        WEBKIT_DOM_NODE (selection_start_marker)),
                                NULL);
 
-                       webkit_dom_node_append_child (
-                               node, WEBKIT_DOM_NODE (br_element), NULL);
+                       if (!WEBKIT_DOM_IS_HTMLBR_ELEMENT (webkit_dom_node_get_last_child (node)))
+                               webkit_dom_node_append_child (
+                                       node, WEBKIT_DOM_NODE (br_element), NULL);
+                       else
+                               remove_node (WEBKIT_DOM_NODE (br_element));
+
                        remove_node (parent);
                }
  restore:


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