From 93ed062900d6b25ebcc435fc80b17e6f0d47446d Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 4 Jun 2020 17:54:18 +0100 Subject: [PATCH] Fix exceptions from Tooltip renderTooltip was not a bound function and so was failing to find the parent when called from the 'scroll' event listener because 'this' was the window object rather than the Tooltip object. Unsure at what point this broke - I assumed it was in thr recent typescript conversion but it looks like it would have had the same problem before. (cherry picked from commit 5e569d75b641c68e973f123f1fea6c633ba1247d) --- src/components/views/elements/Tooltip.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/Tooltip.tsx b/src/components/views/elements/Tooltip.tsx index 133b0ecf58..38960d1a58 100644 --- a/src/components/views/elements/Tooltip.tsx +++ b/src/components/views/elements/Tooltip.tsx @@ -94,7 +94,7 @@ export default class Tooltip extends React.Component { return style; } - private renderTooltip() { + private renderTooltip = () => { // Add the parent's position to the tooltips, so it's correctly // positioned, also taking into account any window zoom // NOTE: The additional 6 pixels for the left position, is to take account of the