[evolution/gnome-3-20] EHTMLEditorView - Pasting content into the indented block will not preserve formatting



commit 3ff04d9b7a24b9d7689143f91b447bebce0dcb75
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Jun 27 10:49:04 2016 +0200

    EHTMLEditorView - Pasting content into the indented block will not preserve formatting
    
    Before this change it would insert a new unindented block instead of continuing
    with the indented one.

 e-util/e-html-editor-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 82bcd44..e75f5dd 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -8877,7 +8877,8 @@ html_editor_view_insert_converted_html_into_selection (EHTMLEditorView *view,
                clone1 = webkit_dom_node_clone_node (WEBKIT_DOM_NODE (block), FALSE);
                clone2 = webkit_dom_node_clone_node (WEBKIT_DOM_NODE (parent), FALSE);
                if (webkit_dom_node_is_equal_node (clone1, clone2) ||
-                   (WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone1) && WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone2))) {
+                   (WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone1) && WEBKIT_DOM_IS_HTML_DIV_ELEMENT (clone2) &&
+                    !element_has_class (WEBKIT_DOM_ELEMENT (clone2), "-x-evo-indented"))) {
                        fix_structure_after_pasting_multiline_content (block);
                        if (g_strcmp0 (html, "\n") == 0) {
                                WebKitDOMElement *br;


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