bot settings: Scroll to bottom after showing bot_error.

Fixes #9868.
The error went unnoticed as the error remains hidden below due to
the scrollable div.
This commit is contained in:
Shubham Padia
2018-07-03 05:26:08 +05:30
committed by Tim Abbott
parent d07f5eef22
commit 17cbafe0e0

View File

@@ -44,6 +44,8 @@ exports.bot_error = function (bot_id, xhr) {
var bot_error_div = bot_info.find('.bot_error');
bot_error_div.text(JSON.parse(xhr.responseText).msg);
bot_error_div.show();
var bot_box = bot_info.closest('.bot-information-box');
bot_box.scrollTop(bot_box[0].scrollHeight - bot_box[0].clientHeight);
};
function add_bot_row(info) {