bokeh/bokeh

[BUG] HoverTool tooltips not disappearing in notebooks

Opened this issue · 0 comments

Software versions

Python version : 3.12.7 (main, Oct 1 2024, 08:52:12) [GCC 11.4.0]
IPython version : 8.26.0
Tornado version : 6.4.1
NumPy version : 1.26.4
Bokeh version : 3.6.0
BokehJS static path : .../lib/python3.12/site-packages/bokeh/server/static
node.js version : v20.18.0
npm version : 10.8.2
jupyter_bokeh version : (not installed)
Operating system : Linux-6.9.3-76060903-generic-x86_64-with-glibc2.35

Browser name and version

Brave v1.61.116,

Jupyter notebook / Jupyter Lab version

Jupyter Lab v4.0.8

Expected behavior

HoverTool tooltips should disappear when the associated Bokeh figure disappears (e.g. scrolling, re-executing a cell).

Observed behavior

Tooltips themselves do not “disappear” as you would expect, when the browser is scrolled vertically. Moving the mouse cursor off the chart seems to work as usual.

Example code

fig.add_tools(bokeh.models.HoverTool(                          
  tooltips=[(str(col), hover, )],                           
  formatters={ ... },
  renderers=[line_el],
  mode='vline',                                                                                                        
))

Stack traceback or browser console output

No response

Screenshots

image