diff --git a/packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin2.tsx b/packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin2.tsx index e9590c434b2..3b755bc379f 100644 --- a/packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin2.tsx +++ b/packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin2.tsx @@ -341,8 +341,10 @@ export const TooltipPlugin2 = ({ }); config.addHook('setSelect', (u) => { - if (clientZoom || queryZoom != null) { - if (maybeZoomAction(u.cursor!.event)) { + let e = u.cursor!.event; + + if (e != null && (clientZoom || queryZoom != null)) { + if (maybeZoomAction(e)) { if (clientZoom && yDrag) { if (u.select.height >= MIN_ZOOM_DIST) { for (let key in u.scales!) {