[evolution/wip/webkit-composer: 818/966] EEditorSelection: Avoid treating the DOMText and DOMElement



commit c207fda400ee1978713cc9ac8ba673153f3befea
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Feb 21 22:37:27 2014 +0100

    EEditorSelection: Avoid treating the DOMText and DOMElement

 e-util/e-editor-selection.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index 3d055df..c777d53 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -3540,6 +3540,11 @@ e_editor_selection_restore_caret_position (EEditorSelection *selection)
                        /* Look if we have DIV on right */
                        next_sibling = webkit_dom_node_get_next_sibling (
                                WEBKIT_DOM_NODE (element));
+                       if (!WEBKIT_DOM_IS_ELEMENT (next_sibling)) {
+                               e_editor_selection_clear_caret_position_marker (selection);
+                               return;
+                       }
+
                        if (element_has_class (WEBKIT_DOM_ELEMENT (next_sibling), "-x-evo-paragraph")) {
                                webkit_dom_node_remove_child (
                                        webkit_dom_node_get_parent_node (


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