ipywidgets
ipywidgets copied to clipboard
Deprecation of widgets.Text.on_submit
Hi everyone,
I'm using the Text widget in a few of my projects. I often employ the on_submit method on them to register a callback that gets called when the user hits enter while the cursor is inside the text box.
There's a deprecation warning on on_submit which recommends using widget.observe(callback, 'value') with continuous_update=False instead.
Having tried to make this switch, I noticed that these aren't exactly equivalent, since widgets.Text.observe also triggers when the cursor leaves the Textbox. In my case, that's undesirable - I'd like for users to explicitly be able to submit a text field by hitting enter.
Is this deprecation of on_submit still planned? Will there be a way to replicate the previous behaviour?
Thanks very much! Jan