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



commit 9c78b0b2e30821ff0914280bb94359848415f5e2
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 d7464b7..0e8ca03 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -3544,6 +3544,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]