[evolution/wip/webkit2] EHTMLEditorView - List item is deleted when enter is pressed on the end of it



commit b89995aa76d98a93b82b8aef02da13876335fb2f
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Mar 3 16:25:56 2016 +0100

    EHTMLEditorView - List item is deleted when enter is pressed on the end of it

 .../composer/e-html-editor-view-dom-functions.c    |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/web-extensions/composer/e-html-editor-view-dom-functions.c 
b/web-extensions/composer/e-html-editor-view-dom-functions.c
index 5ee8ceb..b44c71e 100644
--- a/web-extensions/composer/e-html-editor-view-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-view-dom-functions.c
@@ -9001,9 +9001,6 @@ selection_is_in_empty_list_item (WebKitDOMNode *selection_start_marker)
        gchar *text;
        WebKitDOMNode *sibling;
 
-       /* FIXME WK2 - useless expression*/
-       sibling = webkit_dom_node_get_previous_sibling (WEBKIT_DOM_NODE (selection_start_marker));
-
        /* Selection needs to be collapsed. */
        sibling = webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (selection_start_marker));
        if (!dom_is_selection_position_node (sibling))
@@ -9017,8 +9014,7 @@ selection_is_in_empty_list_item (WebKitDOMNode *selection_start_marker)
        if (sibling && webkit_dom_node_get_next_sibling (sibling))
                return FALSE;
 
-       if (!sibling)
-               return TRUE;
+       sibling = webkit_dom_node_get_previous_sibling (WEBKIT_DOM_NODE (selection_start_marker));
 
        /* Only text node with the zero width space character is allowed. */
        if (!WEBKIT_DOM_IS_TEXT (sibling))


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