diff --git a/CHANGELOG.md b/CHANGELOG.md
index c25d93f18d2..257564d41a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
**Fixes**
- [Issue #655](https://github.com/grafana/grafana/issues/655). General: Auto refresh not initiated / started after dashboard loading
- [Issue #652](https://github.com/grafana/grafana/issues/652). Timepicker: Entering custom date range impossible when refresh is low (now is constantly reset)
+- [Issue #450](https://github.com/grafana/grafana/issues/450). Graph: Tooltip does not disappear sometimes and would get stuck
# 1.7.0-rc1 (2014-08-05)
diff --git a/src/app/components/extend-jquery.js b/src/app/components/extend-jquery.js
index 00fe4666d6f..ce5c8afb1a9 100644
--- a/src/app/components/extend-jquery.js
+++ b/src/app/components/extend-jquery.js
@@ -19,9 +19,8 @@ function ($) {
$tooltip.addClass('grafana-tooltip');
- if (!$.contains(document.body, $tooltip[0])) {
- $tooltip.appendTo(document.body);
- }
+ $("#tooltip").remove();
+ $tooltip.appendTo(document.body);
width = $tooltip.outerWidth(true);
height = $tooltip.outerHeight(true);
diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js
index 5744f3334c0..9ffa55d2254 100755
--- a/src/app/directives/grafanaGraph.js
+++ b/src/app/directives/grafanaGraph.js
@@ -327,7 +327,7 @@ function (angular, $, kbn, moment, _) {
return "%H:%M";
}
- var $tooltip = $('
');
+ var $tooltip = $('
');
elem.bind("plothover", function (event, pos, item) {
var group, value, timestamp, seriesInfo, format;
@@ -357,11 +357,8 @@ function (angular, $, kbn, moment, _) {
timestamp = dashboard.timezone === 'browser' ?
moment(item.datapoint[0]).format('YYYY-MM-DD HH:mm:ss') :
moment.utc(item.datapoint[0]).format('YYYY-MM-DD HH:mm:ss');
- $tooltip
- .html(
- group + value + " @ " + timestamp
- )
- .place_tt(pos.pageX, pos.pageY);
+
+ $tooltip.html(group + value + " @ " + timestamp).place_tt(pos.pageX, pos.pageY);
} else {
$tooltip.detach();
}
diff --git a/src/app/services/dashboard/dashboardKeyBindings.js b/src/app/services/dashboard/dashboardKeyBindings.js
index 8db1723671a..304e10ea5d3 100644
--- a/src/app/services/dashboard/dashboardKeyBindings.js
+++ b/src/app/services/dashboard/dashboardKeyBindings.js
@@ -61,6 +61,12 @@ function(angular, $) {
if (popups.length > 0) {
return;
}
+ // close modals
+ var modalData = $(".modal").data();
+ if (modalData && modalData.$scope && modalData.$scope.dismiss) {
+ modalData.$scope.dismiss();
+ }
+
scope.emitAppEvent('panel-fullscreen-exit');
}, { inputDisabled: true });
};
diff --git a/src/vendor/jquery/jquery.flot.events.js b/src/vendor/jquery/jquery.flot.events.js
index c9ed3359dc0..4924b16d03b 100644
--- a/src/vendor/jquery/jquery.flot.events.js
+++ b/src/vendor/jquery/jquery.flot.events.js
@@ -611,4 +611,4 @@
if (ao.min < bo.min) return -1;
return 0;
};
-})(jQuery);
\ No newline at end of file
+})(jQuery);