[evolution] EHTMLEditorSelection - Selection markers are saved on wrong position after Tabulator
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorSelection - Selection markers are saved on wrong position after Tabulator
- Date: Mon, 11 May 2015 13:11:49 +0000 (UTC)
commit fad83e4d4a3e1712003a9777194bf4d78c433cc3
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]