[evolution/gnome-3-16] EHTMLEditorSelection - Selection markers are saved on wrong position after Tabulator



commit 949048f476985166e2788a7dc46590eef098ed6d
Author: Tomas Popela <tpopela redhat com>
Date:   Mon May 11 14:58:57 2015 +0200

    EHTMLEditorSelection - Selection markers are saved on wrong position after Tabulator
    
    Start of selection is saved inside the Apple-tab-span element and the end after
    it. This caused that i.e. the pasted text after the Tabulator was inserted into
    the element and not after it.

 e-util/e-html-editor-selection.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 1e975ae..13c64b7 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -6878,6 +6878,13 @@ e_html_editor_selection_save (EHTMLEditorSelection *selection)
                                NULL);
                        goto insert_end_marker;
                }
+       } else if (element_has_class (WEBKIT_DOM_ELEMENT (parent_node), "Apple-tab-span") && offset == 1) {
+                       marker_node = webkit_dom_node_insert_before (
+                               webkit_dom_node_get_parent_node (parent_node),
+                               WEBKIT_DOM_NODE (start_marker),
+                               webkit_dom_node_get_next_sibling (parent_node),
+                               NULL);
+                       goto insert_end_marker;
        }
 
        if (WEBKIT_DOM_IS_TEXT (container)) {


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