New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipywidgets return press in text box not working #6555
Comments
Is there a workaround for this? I'd like to capture when Enter is pressed in a import ipywidgets as widgets
caption = widgets.Output()
def onchange(change):
with caption:
print(change)
text = widgets.Text()
text.observe(onchange)
display(caption, text) EDIT: text.on_submit(onchange) |
@tfmark very helpful thanks. Did you find a workaround for the FloatTextBox class? |
I cannot reproduce your behaviour with import ipywidgets as widgets
read_widget = widgets.FloatText(value=0, disabled=True)
write_widget = widgets.FloatText(value=0)
def put(change):
read_widget.value = change["new"]
write_widget.observe(put, names='value')
layout = widgets.HBox([read_widget, write_widget])
display(layout) the |
I see... I might just need to update then. I am using 7.5.1. |
I have exactly the same problem with the IntText input (ipywidgets 7.6.5). When I press enter, nothing happens, but using the up/down arrows or changing focus does work. This is how I configure it:
|
Describe the bug
I have a
FloatTextBox
fromipywidgets
linked to a separateFloatTextBox
. When I press "Enter" inside the text box, nothing happens until I change the focus in my browser. Pressing the incremental change button works instantly. When running in a stand alone Jupyter Notebook the enter propagates the change immediately.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Pressing "Enter" in the writable text box causes the read-only text box to change instantly.
Screenshots
Desktop (please complete the following information):
Environment
The text was updated successfully, but these errors were encountered: