From ea09a51dff0685b250ff12e282e578f55a3dac52 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 4 Aug 2018 21:14:29 +0200 Subject: [PATCH 1/2] [frio] Fix JS error in compose private message page --- view/theme/frio/templates/msg-header.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/view/theme/frio/templates/msg-header.tpl b/view/theme/frio/templates/msg-header.tpl index 97aa5a64fc..209010d7ac 100644 --- a/view/theme/frio/templates/msg-header.tpl +++ b/view/theme/frio/templates/msg-header.tpl @@ -7,6 +7,9 @@ $('#mail-conversation').perfectScrollbar(); $('#message-preview').perfectScrollbar(); // Scroll to the bottom of the mail conversation. - $('#mail-conversation').scrollTop($('#mail-conversation')[0].scrollHeight); + var $el = $('#mail-conversation'); + if ($el.length) { + $el.scrollTop($el.get(0).scrollHeight); + } }); From fe2d97315b279cec5dacf25c1f555696fbb180f2 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 4 Aug 2018 22:10:09 +0200 Subject: [PATCH 2/2] [vier] Add missing addeditortext() JS function in compose private message page --- view/templates/msg-header.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/view/templates/msg-header.tpl b/view/templates/msg-header.tpl index 653b3d5661..4644b954e6 100644 --- a/view/templates/msg-header.tpl +++ b/view/templates/msg-header.tpl @@ -49,5 +49,10 @@ } } + function addeditortext(data) { + var currentText = $("#prvmail-text").val(); + $("#prvmail-text").val(currentText + data); + } +