diff --git a/view/index.js b/view/index.js index f2fc7408e..1dec00319 100644 --- a/view/index.js +++ b/view/index.js @@ -1754,7 +1754,8 @@ function sendGTPCommand(command, ignoreBlocked, callback) { if (callback) callback(response) // Update scrollbars - var $view = $('#console').hasClass('gm-prevented') ? $('#console') : $('#console .gm-scroll-view') + + var $view = $('#console.gm-prevented, #console.gm-scrollbar-container .gm-scroll-view') var scrollbar = $('#console').data('scrollbar') $view.scrollTop($view.get(0).scrollHeight) diff --git a/view/index.view.js b/view/index.view.js index bc832f212..314735ab5 100644 --- a/view/index.view.js +++ b/view/index.view.js @@ -108,7 +108,8 @@ function setShowLeftSidebar(show) { setting.set('view.show_leftsidebar', show) // Update scrollbars - var $view = $('#console').hasClass('gm-prevented') ? $('#console') : $('#console .gm-scroll-view') + + var $view = $('#console.gm-prevented, #console.gm-scrollbar-container .gm-scroll-view') $view.scrollTop($view.get(0).scrollHeight) $view.find('form:last-child input').get(0).focus() $('#console').data('scrollbar').update()