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.
pull/21833/head
David Baker 2020-06-04 17:54:18 +01:00
parent 88c325afa4
commit 5e569d75b6
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ export default class Tooltip extends React.Component<IProps> {
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