title: How to get basic ipywidgets text box working properly in JupyterLab 3.2.9?
body: <p>I'm playing with the Reddit API and I'd like to have a basic text box for the user to input a subreddit to search. I want this interactivity so that I can (hopefully) post my notebook on github or nbviewer and have someone else try it. When I try to run my code, several things happen:</p>
  <ol>
  <li>The notebook continues to execute code cells instead of waiting for user to input a subreddit</li>
  <li>If I execute the cells manually, I can get the text box to appear, but then nothing happens when I hit 'Enter'.</li>
  </ol>
  <p>Below is my code:</p>
  <pre><code>def onchange(change):
      with caption:
          print(change.value)
          
  sub = widgets.Text(placeholder='Enter subreddit', description='r/')
  caption = widgets.Output()
  
  display(sub)
  sub.on_submit(onchange)
  </code></pre>
  <p>And here is what it looks like when I execute the cell manually:</p>
  <p><a href="https://i.stack.imgur.com/AJeO6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AJeO6.png" alt="My cell output" /></a></p>