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

[IPKernelApp] WARNING | No such comm: 606159... #42

Open LukaPitamic opened 5 years ago

LukaPitamic commented 5 years ago

Hi, I've noticed strange behavior of ipyevents:

Code capturing mouse scroll event(wheel > movementY ) works flawlessly on mac, but raises error on linux.

# triggered function when mouse wheel event happens
def handle_event(event):
    # how many steps on mouse scroll is detected
    steps=int(event['movementY'])
    # updated X chart calling layout_scroll_zoom function
    f1.layout.xaxis.range=layout_scroll_zoom(steps)

# listening to mouse wheel events
Event(source=f1, watched_events=['wheel']).on_dom_event(handle_event)

Drag mouse event works on both platform flawlessly. Since one event is detected correctly and other is not, I do not know where to start looking for potential problem.

Thank you for anyone who takes a look into it. You rock! ;)

mwcraig commented 5 years ago

Thank you for anyone who takes a look into it. You rock! ;)

Thanks 😀

What browser are you using on Linux? Some event behavior depends on both browser and os....

LukaPitamic commented 5 years ago

@mwcraig I use Google Chrome.

mwcraig commented 5 years ago

@LukaPitamic sorry for the delay. Any chance you could send me the output from the javascript console when this happens? To see the console, open a notebook in Chrome, then open the developer tools. One of the options in the tools is to show the console. Not sure if you can copy/paste from the console so you may need to screenshot it.

LukaPitamic commented 5 years ago

@mwcraig is this of any help? image This is on: Linux/Chrome. If I can do anything else to help debug the problem, please tell me.