I would like to use a double tap event on non plot models such as buttons. The reason I would like to do this is that there I am trying to modify and update the File Selector widget in panel for a project and a PR, and it is limited by this right now.
I checked the code and saw that it was type hinted as plot and tried to use it with a button anyways just in case and it didn’t work
>>> from bokeh.events import DoubleTap
>>> from bokeh.models import Button
>>> b = Button()
>>> DoubleTap(b)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/madelinescyphers/miniconda3/envs/panel_dev/lib/python3.9/site-packages/bokeh/events.py", line 407, in __init__
super().__init__(model=model)
File "/Users/madelinescyphers/miniconda3/envs/panel_dev/lib/python3.9/site-packages/bokeh/events.py", line 305, in __init__
raise ValueError(f"{self.__class__.__name__} event only applies to Plot models")
ValueError: DoubleTap event only applies to Plot models
Is there any work around? Or how hard would this be to implement? I poked around in bokehjs for a little bit and wasn’t sure even where to start if it was to be implemented.