[evolution/wip/webkit2] EHTMLEditorView - Replace the active selection when inserting emoticons



commit 0e923b75168dd12dbf5cc362dbe1073f7a378cab
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Mar 24 12:43:56 2015 +0100

    EHTMLEditorView - Replace the active selection when inserting emoticons

 web-extensions/e-html-editor-view-dom-functions.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/web-extensions/e-html-editor-view-dom-functions.c 
b/web-extensions/e-html-editor-view-dom-functions.c
index 586cbc0..05f6de0 100644
--- a/web-extensions/e-html-editor-view-dom-functions.c
+++ b/web-extensions/e-html-editor-view-dom-functions.c
@@ -1217,6 +1217,9 @@ emoticon_read_async_cb (GFile *file,
        if (error || (size == -1))
                goto out;
 
+       if (!dom_selection_is_collapsed (document))
+               dom_exec_command (document, E_HTML_EDITOR_VIEW_COMMAND_DELETE, NULL);
+
        dom_selection_save (document);
 
        selection_start_marker = webkit_dom_document_get_element_by_id (


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