From 55af0ce2971cf6bbed51dba34c06791c5772a6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 21 Jul 2015 11:05:25 +0200 Subject: [PATCH] fix(ui): fix scrolling issue when editors are open, fixes #2371 --- public/app/directives/dashEditLink.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/public/app/directives/dashEditLink.js b/public/app/directives/dashEditLink.js index 6145fb46b57..f184af76f20 100644 --- a/public/app/directives/dashEditLink.js +++ b/public/app/directives/dashEditLink.js @@ -38,19 +38,7 @@ function (angular, $) { var editorScope; var lastEditor; - function hideScrollbars(value) { - if (value) { - window.scrollTo(0,0); - document.documentElement.style.overflow = 'hidden'; // firefox, chrome - document.body.scroll = "no"; // ie only - } else { - document.documentElement.style.overflow = 'auto'; - document.body.scroll = "yes"; - } - } - function hideEditorPane() { - hideScrollbars(false); if (editorScope) { editorScope.dismiss(); } } @@ -77,7 +65,6 @@ function (angular, $) { elem.empty(); lastEditor = null; editorScope = null; - hideScrollbars(false); if (editview) { var urlParams = $location.search(); @@ -88,9 +75,6 @@ function (angular, $) { } }; - // hide page scrollbars while edit pane is visible - hideScrollbars(true); - var src = "'" + payload.src + "'"; var view = $('
');