From adc9df803b2ff450f995b99481452d2dc5a5972a Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 14 Nov 2017 07:58:54 +0100 Subject: [PATCH] Fix var scope (#6042) --- program/js/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/js/editor.js b/program/js/editor.js index da92a5b8e..7e06b044f 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -438,7 +438,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}, - value = ed.value; + value = ed.value, pre = value.substring(0, selection.start), end = value.substring(selection.end, value.length);