Keyboard entries to Text widgets are captured by Jupyter

I usaully develop in an editor, but wanted to test making changes with an even faster feedback, so I started coding with Panel in Jupyter. I thought this was a standard way others were developing so was surprised to find that Panel widgets seem to pass there key strokes through Jupyter, where they can get captured if they have a key binding. I was quite surprised when I pressed ‘dd’ in a text box and my code was deleted!

For the examples below, the first one works as expected, but for the Panel widget if I press a key that has binding in Jupyter, then that action is taken. For example, If I press 1 it converts the cell into Markdown and if I press ‘dd’ the cell is deleted.

# Ipython widget
from ipywidgets import widgets 
text = widgets.Text()

# Panel widget
import panel as pn
text1 = pn.widgets.TextInput()

The behavior is the same in Jupter notebook and lab. I’m using Panel 1.3.8 and these versinos for Jupyter:

IPython : 8.21.0
ipykernel : 6.29.2
ipywidgets : 8.1.2
jupyter_client : 8.6.0
jupyter_core : 5.7.1
jupyter_server : 2.12.5
jupyterlab : 4.1.1

I think this is fixed with Textbox style widgets have unexpected behavior with JupyterLab 4 · Issue #6314 · holoviz/panel · GitHub