mwcraig / ipyevents

A custom widget for returning mouse and keyboard events to Python. Documentation:
https://ipyevents.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
112 stars 27 forks source link

provide event target information? #51

Closed allefeld closed 3 years ago

allefeld commented 4 years ago

I made a feature suggestion for JupyterLab, https://github.com/jupyterlab/jupyterlab/issues/7873, where I noted that I tried to use ipyevents to implement it, and ran into problems.

Could you have a look there and tell me whether you would be interested in extending your package to enable the behavior I need?

Briefly, I need to detect mouse click events, but not by x,y coordinates but by targeted element (or even better, a parent of the target element via event.target.closest(selector)).

mwcraig commented 4 years ago

@allefeld -- this would be pretty easy to add, I think (a line or two of javascript in ipyevents).

If you have a bit of time to open a PR to add it that would be great!

allefeld commented 4 years ago

I'll try. Can you give me a hint where to look?

allefeld commented 4 years ago

see https://github.com/jupyterlab/jupyterlab/issues/7873#issuecomment-586646459

mwcraig commented 3 years ago

Closed by #62