mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: url did not update correctly when closing settings view by using ESC key, fixes #8869
This commit is contained in:
@@ -25,7 +25,6 @@ function ($, angular, coreModule) {
|
||||
function hideEditorPane(hideToShowOtherView) {
|
||||
if (editorScope) {
|
||||
editorScope.dismiss(hideToShowOtherView);
|
||||
scope.appEvent('dash-editor-hidden');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +60,15 @@ function ($, angular, coreModule) {
|
||||
var urlParams = $location.search();
|
||||
if (options.editview === urlParams.editview) {
|
||||
delete urlParams.editview;
|
||||
$location.search(urlParams);
|
||||
|
||||
// even though we always are in apply phase here
|
||||
// some angular bug is causing location search updates to
|
||||
// not happen always so this is a hack fix or that
|
||||
setTimeout(function() {
|
||||
$rootScope.$apply(function() {
|
||||
$location.search(urlParams);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user