[evolution] EHTMLEditorView - When editting the HTML message as new move the caret to the beginning as in plain
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorView - When editting the HTML message as new move the caret to the beginning as in plain
- Date: Mon, 3 Nov 2014 15:49:52 +0000 (UTC)
commit b183deaff3d2d3fdf2f2b6a0c3970876875ee390
Author: Tomas Popela <tpopela redhat com>
Date: Mon Nov 3 11:21:43 2014 +0100
EHTMLEditorView - When editting the HTML message as new move the caret to the beginning as in plain text
mode
composer/e-composer-private.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 229b3aa..4644c8b 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -865,7 +865,18 @@ composer_move_caret (EMsgComposer *composer)
"",
NULL);
- e_html_editor_selection_scroll_to_caret (editor_selection);
+ if (e_html_editor_view_get_html_mode (view) &&
+ is_message_from_edit_as_new) {
+
+ webkit_dom_range_select_node_contents (
+ new_range, WEBKIT_DOM_NODE (body), NULL);
+ webkit_dom_range_collapse (new_range, TRUE, NULL);
+
+ webkit_dom_dom_selection_remove_all_ranges (dom_selection);
+ webkit_dom_dom_selection_add_range (dom_selection, new_range);
+ } else
+ e_html_editor_selection_scroll_to_caret (editor_selection);
+
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]