diff --git a/CHANGELOG b/CHANGELOG index 47464ad27..0ce79e342 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ CHANGELOG Roundcube Webmail - Elastic: Resizeable columns (#6929) - Elastic: Fix position and style of auto-complete dropdown on small screens (#6951) - Elastic: Fix initial focus on recipients input in mail compose screen +- Elastic: Fix inserting responses at cursor position (#6971) - Redis: Improve error handling and phpredis 5.X support (#6888) - Archive: Fix bug where next email was not displayed after Archive button use (#6965) - Archive: Fix missing Archive icon in folder selector popup in Elastic diff --git a/program/js/editor.js b/program/js/editor.js index 802d3dbf4..dc18bd788 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -456,7 +456,7 @@ function rcube_text_editor(config, id) } // replace selection in compose textarea else if (ed = rcube_find_object(this.id)) { - var selection = $(ed).is(':focus') ? rcmail.get_input_selection(ed) : {start: 0, end: 0}, + var selection = rcmail.get_input_selection(ed), value = ed.value, pre = value.substring(0, selection.start), end = value.substring(selection.end, value.length); @@ -515,7 +515,7 @@ function rcube_text_editor(config, id) } // get selected text from compose textarea else if (ed = rcube_find_object(this.id)) { - if (args.selection && $(ed).is(':focus')) { + if (args.selection) { text = rcmail.get_input_selection(ed).text; }