mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Fixed widget button onclick register so it only will ever register a callback once.
This commit is contained in:
parent
35fc3af84f
commit
8279db0eb0
@ -53,7 +53,7 @@ class ButtonWidget(Widget):
|
||||
Set to true to remove the callback from the list of callbacks."""
|
||||
if remove:
|
||||
self._click_handlers.remove(callback)
|
||||
else:
|
||||
elif not callback in self._click_handlers:
|
||||
self._click_handlers.append(callback)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user