From ee35535fba25f4262a9d3d124b51855abd550062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Malbr=C3=A1n?= Date: Fri, 24 Jan 2014 03:50:35 -0300 Subject: [PATCH] Scroll to top after the panel is visible --- src/search/FindInFiles.js | 2 +- src/search/FindReplace.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/search/FindInFiles.js b/src/search/FindInFiles.js index 7b6aec57046..efc8fbf88ef 100644 --- a/src/search/FindInFiles.js +++ b/src/search/FindInFiles.js @@ -418,7 +418,6 @@ define(function (require, exports, module) { $searchContent .empty() .append(Mustache.render(searchResultsTemplate, {searchList: searchList})) - .scrollTop(0) // Otherwise scroll pos from previous contents is remembered .off(".searchList") // Remove the old events // Add the click event listener directly on the table parent @@ -478,6 +477,7 @@ define(function (require, exports, module) { $selectedRow = null; } searchResultsPanel.show(); + $searchContent.scrollTop(0); // Otherwise scroll pos from previous contents is remembered if (dialog) { dialog._close(); diff --git a/src/search/FindReplace.js b/src/search/FindReplace.js index 6a596608e65..d857370f946 100644 --- a/src/search/FindReplace.js +++ b/src/search/FindReplace.js @@ -582,6 +582,7 @@ define(function (require, exports, module) { }); replaceAllPanel.show(); + $replaceAllTable.scrollTop(0); // Otherwise scroll pos from previous contents is remembered } /** Shows the Find-Replace search bar at top */